This method returns a catalog with all its elements.
GET https://api.pyrus.com/v4/catalogs/422
{ "catalog_id": 6625, "name": "Clients", "catalog_headers": [ { "name": "Name", "type": "text" }, { "name": "Company", "type": "text" } ], "items": [ { "item_id": 15200, "values": [ "Reatha Middendorf", "Acme, inc." ] }, { "item_id": 15201, "values": [ "Daedra Ullrich", "Widget Corp" ] }, { "item_id": 15202, "values": [ "Andy Mahn", "123 Warehousing" ] } ] }
curl -X GET \ https://api.pyrus.com/v4/catalogs/422 \ -H 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \ -H 'Content-Type: application/json'
Create a catalog.
This method returns a catalog with all its elements.
PUT https://api.pyrus.com/v4/catalogs
{ "name": "Clients", "catalog_headers": [ "Name", "Company" ], "items": [ { "values": [ "Reatha Middendorf", "Acme, inc." ] }, { "values": [ "Daedra Ullrich", "Widget Corp" ] }, { "values": [ "Andy Mahn", "123 Warehousing" ] } ] }
{ "catalog_id": 6625, "name": "Clients", "catalog_headers": [ { "name": "Name", "type": "text" }, { "name": "Company", "type": "text" } ], "items": [ { "item_id": 15200, "values": [ "Reatha Middendorf", "Acme, inc." ] }, { "item_id": 15201, "values": [ "Daedra Ullrich", "Widget Corp" ] }, { "item_id": 15202, "values": [ "Andy Mahn", "123 Warehousing" ] } ] }
curl -X PUT \ https://api.pyrus.com/v4/catalogs/ \ -H 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \ -H 'Content-Type: application/json' \ -d '{ "name": "Clients", "catalog_headers": [ "Name", "Company" ], "items": [ { "values": [ "Reatha Middendorf", "Acme, inc." ] }, { "values": [ "Daedra Ullrich", "Widget Corp" ] }, { "values": [ "Andy Mahn", "123 Warehousing" ] } ] }'
Sync a catalog.
This method updates catalog headers and items. You must define all the values and text columns that need to remain in the catalog.
All unspecified items and text columns will be deleted.
This method only changes the values. To do this, you must pass it explicitly in the list of columns. You can not add or delete workflow columns using this method.
The first column of the catalog is the key parameter. Therefore, its name cannot be changed.
This method returns a list of items that have been added, modified, or deleted.
POST https://api.pyrus.com/v4/catalogs/6625
{ "apply": true, "catalog_headers": [ "Name", "Company" ], "items": [ { "values": [ "Reatha Middendorf", "Acme" ] }, { "values": [ "Daedra Ullrich", "Widget Corp" ] }, { "values": [ "Jean Overturf", "Demo Company" ] } ] }
{ "apply": true, "added": [ { "item_id": 15205, "values": [ "Jean Overturf", "Demo Company" ] } ], "deleted": [ { "item_id": 15202, "values": [ "Andy Mahn", "123 Warehousing" ] } ], "updated": [ { "item_id": 15200, "values": [ "Reatha Middendorf", "Acme" ] } ], "catalog_headers": [ { "name": "Name", "type": "text" }, { "name": "Customer Company", "type": "text" } ] }
curl -X POST \ https://api.pyrus.com/v4/catalogs/6625 \ -H 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \ -H 'Content-Type: application/json' \ -d '{ "apply": true, "catalog_headers": [ "Name", "Company" ], "items": [ { "values": [ "Reatha Middendorf", "Acme" ] }, { "values": [ "Daedra Ullrich", "Widget Corp" ] }, { "values": [ "Jean Overturf", "Demo Company" ] } ] }'
apply | Define this as true if you want to apply changes, or false if you want to calculate which items will be added/deleted/updated. |
catalog_headers | An array of catalog headers. All unspecified text columns will be deleted. |
items | An array of catalog items. All unspecified items will be deleted. |