Get listings
const url = 'https://acme.mykreezalid.com/api/partners/v1/listings?admin_status=waiting%2Crejected&category_id=12%2C34&fields=title%2Cprice%2Cattributes&order_type_id=2&status=published%2Cdraft&page=1&limit=25';const options = {method: 'GET', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://acme.mykreezalid.com/api/partners/v1/listings?admin_status=waiting%2Crejected&category_id=12%2C34&fields=title%2Cprice%2Cattributes&order_type_id=2&status=published%2Cdraft&page=1&limit=25' \ --header 'Authorization: Basic <credentials>'Returns a paginated list of your listings, most recent first. Filter the results with the query parameters below; each filter takes a single value, a comma-separated list or an array (status[]=draft&status[]=archived). Reduce the payload by listing the fields you need in fields (for example /listings?category_id=5,9&fields=id,title,price): when it is omitted, every field is returned. Required yes/no attributes that have no value on a listing are filled in with their default value.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Example
waiting,rejectedFilter by moderation status: approved, rejected, waiting or blocked. A single value or a comma-separated list.
Example
12,34Filter by category ID(s). Can be a single ID or a comma-separated list.
Example
title,price,attributesComma-separated list of fields to include in the response (e.g. title,price,attributes).
Example
2Filter by order type ID(s), as returned by GET /listings/order_types. A single ID or a comma-separated list.
Example
published,draftFilter by listing status: published, draft or archived. A single value or a comma-separated list.
Page to return, starting at 1.
Number of listings per page, at most 100.
Responses
Section titled “Responses”Your listings
object
object
Listing’s unique identifier
Admin validation status of the listing. Possible values: waiting (awaiting approval), approved (visible if status also published), rejected (hidden from the marketplace).
object
Category’s unique identifier
Category’s unique identifier
Order type’s unique identifier
object
Public status of the listing. Possible values: draft, published (visible), archived (hidden).
The store that holds this listing, by its id (as returned by GET /stores). The listing then shows at that store’s address, and buyers are told where to collect it. Leave the field out entirely to keep whatever store it already had. To move the listing, send the store it moves TO: a listing already in a store CANNOT be taken out of one by sending an empty value, because attaching replaced its own address and there is none to fall back to — unpublish it instead. A store that is not one of yours is refused. Send either store_id or store_external_id, not both.
Optional alternative to store_id: YOUR OWN code for the store, the external_id you gave it. Only usable for a store that has one. Same rules as store_id: leave it out to keep the current store, send the code of the store the listing moves to, an empty value cannot take a listing out of its store. Send either store_id or store_external_id, not both.
object
User’s unique identifier
Absolute URL of the profile image
Company or organization name
object
Group’s unique identifier
Average note based on reviews
Account status. Possible values are “enabled2” or “disabled”
Supplier’s unique identifier
object
Variant’s unique identifier
The quantity of the variant that is available for sale
Sorts the variants with the lowest number first. Negative numbers are allowed.
Defines where the listing is displayed. Possible values: both (visible in catalog and search), catalog (only catalog), search (only search results), none (not visible).
Paging information, added next to the results of a paginated list. Request another page with the page query parameter and change the page size with limit (at most 100).
object
Number of results across all pages.
Number of the page returned, starting at 1.
Whether a next page exists.
Whether a previous page exists.
Number of results on this page.
Number of pages.
Example
{ "listings": [ { "id": 645646, "object": "Listing", "admin_status": "waiting", "attributes": "[]", "category": { "id": 432432, "object": "Category" }, "category_id": 432432, "city": "New York City", "country": "US", "currency": "USD", "description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla dignissim laoreet sem, quis mollis elit rutrum a. Donec nunc urna, rhoncus in sagittis ut, elementum scelerisque libero. Quisque interdum nibh nisl, non gravida nibh molestie quis. Phasellus nunc nunc, luctus a luctus ac, iaculis sit amet turpis.</p><p>Phasellus tortor orci, posuere in mi at, blandit ullamcorper tellus. Proin vel sem aliquam, faucibus dolor quis, dictum leo. Aliquam consectetur massa at ipsum auctor, at mattis nunc porttitor. Suspendisse potenti. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p>", "external_id": "INTERNAL_REF_234324", "lat": 40.7572114, "lng": -73.9913385, "location": "253 W 42nd St, New York, NY 10036, United States", "min_qty": 1, "order_type_id": 986545, "price": 123.5, "price_unit": null, "price_with_currency": "$123.50", "quantity": 43, "quantity_selector": null, "requires_shipping": true, "shipping_methods": [ { "id": 1, "carrier_alias": "fed_ex", "price": 4.95, "sort_priority": 4, "step_price": 0.95, "title": "FedEx" } ], "slug": "listing-s-slug", "state": "NY", "status": "draft", "store_id": 217833, "store_external_id": "SHOP-BRUSSELS-01", "supplier": { "id": 545353, "object": "User", "account_type": "individual", "external_id": "ABCdef123456", "address_city": "New-York City", "address_country": "US", "address_line1": "253 W 42nd St", "address_line2": null, "address_state": "NY", "address_zipcode": "NY 10036", "attributes": { "profession": "Web developer" }, "business_name": "ACME", "email": "admin@acme.com", "first_name": "John", "group": [ { "object": "Group", "id": 784568, "name": "VIP Customers", "alias": "vip-customers" } ], "group_id": 784568, "last_name": "Doe", "locale": "en", "note": "4.5", "phone_country_number": "+1", "phone_number": "212-398-2600", "public_name": "John Doe", "status": "enabled", "store_id": "123456", "review_count": "3", "timezone": "UTC", "username": "BestJohnDoe" }, "supplier_id": 655785, "title": "Listing's title", "variants": { "id": 432432, "object": "Variant", "external_id": "INTERNAL_REF_234324", "listing_id": 324353, "price": 123.5, "price_unit": null, "quantity": "1", "sort_priority": "0", "sku": "BASKT-XYZ-BLN-41", "title": "Blue Shoes Size 41", "weight": 0.8 }, "visibility": "both", "weight": 0.8 } ], "pagination": { "totalResultsCount": 137, "currentPage": 1, "resultOnPageCount": 25, "pageCount": 6 }}category_id or order_type_id holds something other than positive integer IDs.
Missing or wrong API credentials.