Products¶
This API lets you define and read a catalog of products. A product is some kind of item being sold. Products are often physical, but don’t have to be; a digital download (such as a movie, music or e-book file) also qualifies as a product. A product is sometimes referred to as ‘a SKU’.
Products collection¶
GET¶
Retrieve list of products of a specific organization.
GET /orgs/{org_pk}/products/
Parameters
filters: GET parameters to filter results.
Filters will limit the Products returned, all filters are optional, multiple filters can be specified. Right now Products have only one filter.
updated_at__gte
- Product update time (in ReadyCloud). Accepts ISO 8601 timestamp, with timezone defaulting to UTC, such as:2016-09-26T07:45:14Z
. Products with values greater than or equal the supplied value will be returned, respectively. Example:?updated_at__gte=2016-09-26T07:45:14Z
products created after Sep. 26th 2016 at 7:45:14 UTC time will be returned.
Example request:
curl -iL --request GET "https:/www.readycloud.com/api/v2/orgs/1/products/?bearer_token=4ef5b29b1f4f35c383bebfccf4bf4d01"
Response 200 (application/json):
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"code": "1",
"commodity_code": "C-1",
"created_at": "2013-07-11T20:49:00Z",
"custom_fields": {},
"description": "Item Description",
"export_type_code": "SIM",
"image_link": null,
"joint_production": true,
"kind": null,
"link": "http://box.url",
"net_cost_begin_date": "2013-07-11T20:49:00Z",
"net_cost_code": "NCC",
"net_cost_end_date": "2013-07-11T20:49:00Z",
"origin_country_code": "US",
"part_number": "PN-1",
"pick_location": "Some location",
"preference_criteria_code": "Criteria-5",
"producer_info_code": "Yes",
"quantity": 3,
"scheduleb_commodity_code": "SCC-5",
"source": {
"account": null,
"channel": null,
"id": null,
"name": "FedEx",
"retrieved_at": "2015-08-13T09:33:07Z",
"updated_at": "2015-08-13T09:33:07Z"
},
"unit_price": "15.00 USD",
"unit_weight": "170.0000 g",
"updated_at": "2013-07-11T20:49:00Z",
"ups": "ups123",
"ean": "ean123",
"isbn": "isbn123",
"url": "/api/v2/orgs/1/products/1/"
}
]
}
POST¶
Create new product for a specific organization.
POST /orgs/{org_pk}/products/
- Attributes:
- kind (string, required) -
goods
,discount
,tax
,adjustment
- kind (string, required) -
Example request:
curl -iL --request POST -H "Content-Type: application/json" --upload-file data.json "https:/www.readycloud.com/api/v2/orgs/1/products/?bearer_token=4ef5b29b1f4f35c383bebfccf4bf4d01"
data.json:
{
"code": "ES-4335-64667-7565",
"commodity_code": "C-1",
"created_at": "2015-05-14T09:59:44.290553Z",
"custom_fields": {
"Special customer type": {
"value": "Guest"
},
"Top color": {
"value": "Deep purple"
},
"xml": {
"type": "application/xml",
"value": "<custom>Field</custom>"
}
},
"description": "T-Shirt Unisex Black",
"export_type_code": "SIM",
"image_link": "http://example.com/tshirt.png",
"joint_production": true,
"kind": "goods",
"link": "http://www.test.com/item",
"net_cost_begin_date": "2014-10-10T06:49:50Z",
"net_cost_end_date": "2014-10-12T06:49:50Z",
"origin_country_code": "US",
"part_number": "PN-3",
"pick_location": "Some location",
"preference_criteria_code": "Criteria-5",
"producer_info_code": "No[2]",
"quantity": 15,
"scheduleb_commodity_code": "SCC-5",
"unit_price": "88.00 USD",
"unit_weight": "29.00 g",
"ups": "ups123",
"ean": "ean123",
"isbn": "isbn123"
}
Response 201 (application/json):
{
"code": "ES-4335-64667-7565",
"commodity_code": "C-1",
"created_at": "2015-08-13T09:33:07Z",
"custom_fields": {
"Special customer type": {
"value": "Guest"
},
"Top color": {
"value": "Deep purple"
},
"xml": {
"type": "application/xml",
"value": "<custom>Field</custom>"
}
},
"description": "T-Shirt Unisex Black",
"export_type_code": "SIM",
"image_link": "http://example.com/tshirt.png",
"joint_production": true,
"kind": "goods",
"link": "http://www.test.com/item",
"net_cost_begin_date": "2014-10-10T06:49:50Z",
"net_cost_code": null,
"net_cost_end_date": "2014-10-12T06:49:50Z",
"origin_country_code": "US",
"part_number": "PN-3",
"pick_location": "Some location",
"preference_criteria_code": "Criteria-5",
"producer_info_code": "No[2]",
"quantity": 15,
"scheduleb_commodity_code": "SCC-5",
"source": {
"account": null,
"channel": null,
"id": null,
"name": null,
"retrieved_at": "2015-08-13T09:33:07Z",
"updated_at": "2015-08-13T09:33:07Z"
},
"unit_price": "88.00 USD",
"unit_weight": "29.0000 g",
"updated_at": "2015-08-13T09:33:07Z",
"ups": "ups123",
"ean": "ean123",
"isbn": "isbn123",
"url": "/api/v2/orgs/1/products/2/"
}
Product¶
GET¶
Retrieve details of a specific product.
GET /orgs/{org_pk}/products/{product_pk}/
Example request:
curl -iL --request GET "https:/www.readycloud.com/api/v2/orgs/1/products/1/?bearer_token=4ef5b29b1f4f35c383bebfccf4bf4d01"
Response 200 (application/json):
{
"code": "1",
"commodity_code": "C-1",
"created_at": "2013-07-11T20:49:00Z",
"custom_fields": {},
"description": "Item Description",
"export_type_code": "SIM",
"image_link": null,
"joint_production": true,
"kind": null,
"link": "http://box.url",
"net_cost_begin_date": "2013-07-11T20:49:00Z",
"net_cost_code": "NCC",
"net_cost_end_date": "2013-07-11T20:49:00Z",
"origin_country_code": "US",
"part_number": "PN-1",
"pick_location": "Some location",
"preference_criteria_code": "Criteria-5",
"producer_info_code": "Yes",
"quantity": 3,
"scheduleb_commodity_code": "SCC-5",
"source": {
"account": null,
"channel": null,
"id": null,
"name": "FedEx",
"retrieved_at": "2015-08-13T09:33:07Z",
"updated_at": "2015-08-13T09:33:07Z"
},
"unit_price": "15.00 USD",
"unit_weight": "170.0000 g",
"updated_at": "2013-07-11T20:49:00Z",
"ups": "ups123",
"ean": "ean123",
"isbn": "isbn123",
"url": "/api/v2/orgs/1/products/1/"
}
PATCH¶
Update a specific product.
PATCH /orgs/{org_pk}/products/{product_pk}/
Example request:
curl -iL --request PATCH -H "Content-Type: application/json" --upload-file data.json "https:/www.readycloud.com/api/v2/orgs/1/products/1/?bearer_token=4ef5b29b1f4f35c383bebfccf4bf4d01"
data.json:
{
"image_link": "http://example.com/goods/img-2.png",
"kind": "goods",
"origin_countr_code": "CN",
"quantity": 19,
"unit_weight": "180 g"
}
Response 200 (application/json):
{
"code": "1",
"commodity_code": "C-1",
"created_at": "2013-07-11T20:49:00Z",
"custom_fields": {},
"description": "Item Description",
"export_type_code": "SIM",
"image_link": "http://example.com/goods/img-2.png",
"joint_production": true,
"kind": "goods",
"link": "http://box.url",
"net_cost_begin_date": "2013-07-11T20:49:00Z",
"net_cost_code": "NCC",
"net_cost_end_date": "2013-07-11T20:49:00Z",
"origin_country_code": "US",
"part_number": "PN-1",
"pick_location": "Some location",
"preference_criteria_code": "Criteria-5",
"producer_info_code": "Yes",
"quantity": 19,
"scheduleb_commodity_code": "SCC-5",
"source": {
"account": null,
"channel": null,
"id": null,
"name": "FedEx",
"retrieved_at": "2015-08-13T09:33:07Z",
"updated_at": "2015-08-13T09:33:07Z"
},
"unit_price": "15.00 USD",
"unit_weight": "180.0000 g",
"updated_at": "2015-08-13T09:33:07Z",
"ups": "ups123",
"ean": "ean123",
"isbn": "isbn123",
"url": "/api/v2/orgs/1/products/1/"
}
DELETE¶
Delete a specific product.
DELETE /orgs/{org_pk}/products/{product_pk}/
Response 204 (application/json)