Sending Catalog Data to Senitron
Method 1: Push API with a CSV Attachment Method 2: Push API JSON List | Show | Create | Update | Destroy Method 3: Upload & Sync Via Senitron Catalog Uploader / Importer App (Windows) Method 4: Upload via the Web Interface
Method 1: Push API with a CSV Attachment
- Every tenant needs to have Item # Padding defined and enabled on the cloud dashboard account, before uploading data via this API. Otherwise the data will be rejected, and not consumed properly. This option is visible under "Tenant Settings > EPC Settings"
- For performance reasons, if the CSV files contains more than 1000 records, the cloud processor will truncate the entire Senitron Cloud Catalog, and the import the CSV file. This is done for performance reasons, since it is significantly faster to insert rows, rather than updating them.
Method 2: Push API JSON List | Show | Create | Update | Destroy
Get List of Catalog Items
METHOD: GET
URL: {tenant}/api/v1/catalogs
PARAMETERS:
api_key=xxxxxxxxxx
query=xxx
page=1
pre_page=20
Content-Type=application/json
Note:
- query acts on asset_id, sku, custom_sku, alu, upc and description.
REQUEST BODY:
None
RESPONSE BODY:
Success (Status Code: 200)
{ "pagination": { "current_page": 1, "per_page": 20, "total_entries": 1 }, "items": [ { "id": 1001, "number": "210000000103", "upc": 3020, "alu": "XP-1", "sku": "6783325235", "custom_sku": "", "description": "BOYS SUITBOYSUIFAS", "short_description": "", "style": "A-1", "colour": "Yellow", "size": "XXL", "type": "Regular", "manufacturer": "Nike", "vendor_id": "", "vendor_name": "", "price": 80.00, "retail_price": 90.50, "msrp": 92.00, "extra": "", "dcs": "", "dnc": false, "categories": [ { "name": "Pranet Category", "children": [ "name": "Child Category", "children": [] ] } ], "unit_of_measure": "", "base_unit_of_measure": "", "preferred_unit_of_measure": "", "mf_back_flush": false, "mf_exp_calculation": "", "ext_sync": false, "mf_disable_production": false, "mf_auto_production_quality_hold": false, "attr3": "", "attr4": "", "attr5": "", "attr6": "", "attr7": "", "attr8": "", "attr9": "", "attr10": "", "attr11": "", "attr12": "", "attr13": "", "attr14": "", "attr15": "", "attr16": "", "attr17": "", "attr18": "", "attr19": "", "attr20": "", "picture": "", "cloud_picture_url": "", "created_at": "11/10/2022 10:30 AM", "updated_at": "11/11/2022 11:10 AM" } ] }
Error (Status Code: 404)
{ "status": "error", "code": 101, "message": "Invalid API key" }
Get Catalog Item
METHOD: GET
URL: {tenant}/api/v1/catalogs/(number)
PARAMETERS:
api_key=xxxxxxxxxx
Content-Type=application/json
REQUEST BODY:
None
RESPONSE BODY:
Success (Status Code: 200)
{ "id": 1001, "number": "210000000103", "upc": 3020, "alu": "XP-1", "sku": "6783325235", "custom_sku": "", "description": "BOYS SUITBOYSUIFAS", "short_description": "", "style": "A-1", "colour": "Yellow", "size": "XXL", "type": "Regular", "manufacturer": "Nike", "vendor_id": "", "vendor_name": "", "price": 80.00, "retail_price": 90.50, "msrp": 92.00, "extra": "", "dcs": "", "dnc": false, "categories": [ { "name": "Pranet Category", "children": [ "name": "Child Category", "children": [] ] } ], "unit_of_measure": "", "base_unit_of_measure": "", "preferred_unit_of_measure": "", "mf_back_flush": false, "mf_exp_calculation": "", "ext_sync": false, "mf_disable_production": false, "mf_auto_production_quality_hold": false, "attr3": "", "attr4": "", "attr5": "", "attr6": "", "attr7": "", "attr8": "", "attr9": "", "attr10": "", "attr11": "", "attr12": "", "attr13": "", "attr14": "", "attr15": "", "attr16": "", "attr17": "", "attr18": "", "attr19": "", "attr20": "", "picture": "", "cloud_picture_url": "", "created_at": "11/10/2022 10:30 AM", "updated_at": "11/11/2022 11:10 AM" }
Error (Status Code: 404)
{ "status": "error", "code": 101, "message": "Invalid API key" } { "status": "error", "code": 102, "message": "Item not found" }
Create New Catalog Item
METHOD: POST
URL: {tenant}/api/v1/catalogs
PARAMETERS:
api_key=xxxxxxxxxx
Content-Type=application/json
REQUEST BODY:
{ "number": "210000000103", "upc": 3020, "alu": "XP-1", "sku": "6783325235", "custom_sku": "", "description": "BOYS SUITBOYSUIFAS", "short_description": "", "style": "A-1", "colour": "Yellow", "size": "XXL", "type": "Regular", "manufacturer": "Nike", "vendor_id": "", "vendor_name": "", "price": 80.00, "retail_price": 90.50, "msrp": 92.00, "extra": "", "dcs": "", "dnc": false, "categories": [ { "name": "Pranet Category", "children": [ { "name": "Child Category", "children": [] } ] } ], "unit_of_measure": "", "base_unit_of_measure": "", "preferred_unit_of_measure": "", "mf_back_flush": false, "mf_exp_calculation": "", "ext_sync": false, "mf_disable_production": false, "mf_auto_production_quality_hold": false, "attr3": "", "attr4": "", "attr5": "", "attr6": "", "attr7": "", "attr8": "", "attr9": "", "attr10": "", "attr11": "", "attr12": "", "attr13": "", "attr14": "", "attr15": "", "attr16": "", "attr17": "", "attr18": "", "attr19": "", "attr20": "", "picture": "" }
Note:
- Number is unique
- The API generates types and categories if they are not exist
- Picture contains an image URL
RESPONSE BODY:
Success (Status Code: 200)
{ "message": "The catalog item created successfully" }
Error (Status Code: 404)
{ "status": "error", "code": 101, "message": "Invalid API key" } { "status": "error", "code": 103, "message": "Item number exists in database" }
Update Catalog Item
METHOD: PUT
URL: {tenant}/api/v1/catalogs/(number)
PARAMETERS:
api_key=xxxxxxxxxx
Content-Type=application/json
REQUEST BODY:
{ "number": "210000000103", "upc": 3020, "alu": "XP-1", "sku": "6783325235", "custom_sku": "", "description": "BOYS SUITBOYSUIFAS", "short_description": "", "style": "A-1", "colour": "Yellow", "size": "XXL", "type": "Regular", "manufacturer": "Nike", "vendor_id": "", "vendor_name": "", "price": 80.00, "retail_price": 90.50, "msrp": 92.00, "extra": "", "dcs": "", "dnc": false, "categories": [ { "name": "Pranet Category", "children": [ { "name": "Child Category", "children": [] } ] } ], "unit_of_measure": "", "base_unit_of_measure": "", "preferred_unit_of_measure": "", "mf_back_flush": false, "mf_exp_calculation": "", "ext_sync": false, "mf_disable_production": false, "mf_auto_production_quality_hold": false, "attr3": "", "attr4": "", "attr5": "", "attr6": "", "attr7": "", "attr8": "", "attr9": "", "attr10": "", "attr11": "", "attr12": "", "attr13": "", "attr14": "", "attr15": "", "attr16": "", "attr17": "", "attr18": "", "attr19": "", "attr20": "", "picture": "" }
Note:
- Number is unique
- The API generates types and categories if they are not exist
- Picture contains an image URL
RESPONSE BODY:
Success (Status Code: 200)
{ "message": "The catalog item updated successfully" }
Error (Status Code: 404)
{ "status": "error", "code": 101, "message": "Invalid API key" } { "status": "error", "code": 102, "message": "Item does not exists in database" }
Delete Catalog Item
METHOD: DELETE
URL: {tenant}/api/v1/catalogs/(number)
PARAMETERS:
api_key=xxxxxxxxxx
Content-Type=application/json
REQUEST BODY:
None
RESPONSE BODY:
Success (Status Code: 200)
{ "message": "The catalog item removed successfully" }
Error (Status Code: 404)
{ "status": "error", "code": 101, "message": "Invalid API key" } { "status": "error", "code": 102, "message": "Item does not exists in database" }
Method 2 [Old]: Push API JSON List | Show | Create | Update | Destroy
Method 3: Upload & Sync Via Senitron Catalog Uploader / Importer App (Windows)
Export the catalog from your external software into a CSV file, and use the Senitron Catalog Exporter / Importer Windows App, to map the fields in your CSV to the fields that match up best with Senitron's Catalog fields. Upload the full file, and or upload differential files, as often as desired.
Video instructions https://www.loom.com/share/979b560ae354468c92ee2d8dbb085859
- Every tenant needs to have Item # Padding defined and enabled on the cloud dashboard account, before uploading data via this API. Otherwise the data will be rejected, and not consumed properly. This option is visible under "Tenant Settings > EPC Settings"
- For performance reasons, if the CSV files contains more than 1000 records, the cloud processor will truncate the entire Senitron Cloud Catalog, and the import the CSV file. This is done for performance reasons, since it is significantly faster to insert rows, rather than updating them.