latestOpenAPI 3.1.02026-08-192592535.9 KB

819df1427359

stock_updates

Get Stock Updates

This endpoint retrieves all offers for a given project of your company, sorted from most recent to oldest. Offers are the product updates that you posted.

These are found under "Orders" > "Product updates" in the Channable tool. Optionally, you can pass query parameters to customize the query and response content.

Example usage

Suppose the following scenario for a given project of yours:

  • The project contains the offers o1, o2, o3, and o4 (from oldest to most recent)
  • o1 and o4 are searchable by the term t
  • o3 is searchable by the term tE
Request parametersResponse
none{"offers": [o4, o3, o2, o1], "total": 4}
?limit=2{"offers": [o4, o3], "total": 2}
?offset=4{"offers": [], "total": 0}
?offset=1{"offers": [o3, o2, o1], "total": 3}
?offset=1&limit=1{"offers": [o3], "total": 1}
?offset=1&limit=2{"offers": [o3, o2], "total": 2}
?search=t{"offers": [o4, o1], "total": 2}
?search=tE{"offers": [o3], "total": 1}
?start_date=2018-01-01{"offers": [o4, o3, o2], "total": 3}
?start_date=2018-01-01&end_date=2018-02-28{"offers": [o3, o2], "total": 2}
?last_modified_after=2018-02-29{"offers": [o4], "total": 1}
get/v1/companies/{company_id}/projects/{project_id}/offers

Path parameters

company_idinteger required
project_idinteger required

Query parameters

searchstring nullable

Any text based search query

Any text based search query

string date
OR
string date-time
string date
OR
string date-time
string date
OR
string date-time
string date
OR
string date-time
limitinteger

Max number of results in a single page.

Max number of results in a single page.

offsetinteger

Filter results starting from this offset.

Filter results starting from this offset.

Response

Successful Response

totalinteger required

Example response

{
  "offers": [
    {
      "client_id": "2026523",
      "created": "2022-04-19T07:18:44.436934+00:00",
      "gtin": "1234567890123",
      "id": 2251,
      "modified": "2022-04-19T07:18:44.436934+00:00",
      "price": 10.5,
      "project_id": -1,
      "stock": 0,
      "stock_tracking": true,
      "title": "test title"
    }
  ],
  "total": 1
}