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

METHOD: POST URL: {tenant}/api/v1/catalog/import?import_type=2&api_key={key} BODY: CSV Object containing the catalog details (pipe "|" separated fields) RESPONSE: 200 -> OK 404 -> Error, reason included in the response body 406 -> Missing catalog file for upload To import a catalog, make a POST request to the "import" endpoint, and add the CSV catalog file to the request as with the param name: "attachment". POST https://app.senitron.net/{tenant}/api/v1/catalog/import?import_type=2&api_key={key}
Possible CSV Fields "number" - is the Senitron unique item number (aka Asset ID#) , which must be numbers only without spaces or special characters.  example "0000001"  If and when possible,  it would be ideal, that this unique number matches, the same unique item # in external software, for smoother integration. When this is not possible, it is recommended that the unique identified from the external software are saved in to the ALU, UPC, or SKU fields. "alu" - must be a unique alpha-numeric value. "upc" - must be a unique numeric value. "style" - can be a shared value, with a group value. example "Classic Apparel" "price" - must be a number value contain price. example "99.99" "colour" , "size" , "extra" - can be used to store any attribute value, and not necessarily just color, size.  Once uploaded the attribute label display name is editable in the cloud dashboard. "type" - the default value for this is "regular" in Senitron, and not required to be uploaded.  The type values in Senitron are used to enforce various rules, for automate processing of certain conditions. Example "regular" items may switch to pending visibility status if not seen for 1 week, Versus, "high-value" items which may change to "Pending Visibility" If they have not been seen for a few hours. The value for this, can not be text, must be the Senitron DB Item which is visible. "tota_qty" - is the universal default replenishment value for an item, regardless of the location.
Download Sample CSV Template File Sample Contents of CSV File ============================== number|alu|upc|description|style|price|colour|size|extra|type|categories|total_qty|cloud_picture_url 123456|alu456|123456|description item a|style A|99.99|Yellow|Medium|ExtraA|241|Parent Cat A, Sub-Cat A|15|https://abc.com/1.jpg 123457|alu457|123457|description item b|style B|98.98|Black|Small|ExtraB|241|Parent Cat B, Sub-Cat A|9|https://abc.com/1.jpg
  • 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

Catalog list METHOD: GET URL: /{tenant}/api/v1/manufacturing/catalogs?key={api_key} RESPONSE: 200 -> OK 404 -> Error, reason included in the response body Retrieve all catalogs GET https://app.senitron.net/{tenant}/api/v1/manufacturing/catalogs.json?key={key}
Catalog Show METHOD: GET URL: /{tenant}/api/v1/manufacturing/catalogs/(id)?key={api_key} ID: Single of item number from the catalog items RESPONSE: 200 -> OK 404 -> Error, reason included in the response body Retrieve information of catalog for item/s GET https://app.senitron.net/{tenant}/api/v1/manufacturing/catalogs/000001.json?key={key}
Create Catalog Item  METHOD: POST URL: /{tenant}/api/v1/manufacturing/catalogs?key={api_key} BODY: JSON Object containing the catalog details RESPONSE: 200 -> OK 404 -> Error, reason included in the response body POST https://app.senitron.net/{tenant}/api/v1/manufacturing/catalogs?key={key} BODY { "type": "Regular", "alu": "0001", "price": "12", "style": "New Style", "upc": "123", "description": "Description of Catalog", "colour": "Red", "cloud_picture_url": "image url", "total_qty": "4", "extra": "Extra information", "categories": { "name": "Parent Category", "children": [ { "name": "Child Category", "children": [] } ] } }
Update Catalog Item METHOD: PUT/PATCH URL: /{tenant}/api/v1/manufacturing/catalogs/(id)?key={api_key} BODY: JSON Object containing the catalog details RESPONSE: 200 -> OK 404 -> Error, reason included in the response body PUT/PATCH https://app.senitron.net/{tenant}/api/v1/manufacturing/catalogs/000001.json?key={key} BODY { "type": "Regular", "alu": "0001", "price": "12", "style": "New Style", "upc": "123", "description": "Description of Catalog", "colour": "Red", "cloud_picture_url": "image url", "total_qty": "4", "extra": "Extra information", "categories": { "name": "Parent Category", "children": [ { "name": "Child Category", "children": [] } ] } } Response { “message”: “ok” }
Destroy a Catalog Item METHOD: DELETE URL: /{tenant}/api/v1/manufacturing/catalogs/(id)?key={api_key} ID: Single of item number from the catalog items RESPONSE: 200 -> OK 404 -> Error, reason included in the response body DELETE https://app.senitron.net/{tenant}/api/v1/manufacturing/catalogs/000001.json?key={key} Response { “message”: “ok” }

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

Possible CSV Fields "number" - is the Senitron unique item number (aka Asset ID#) , which must be numbers only without spaces or special characters.  example "0000001"  If and when possible,  it would be ideal, that this unique number matches, the same unique item # in external software, for smoother integration. When this is not possible, it is recommended that the unique identified from the external software are saved in to the ALU, UPC, or SKU fields. "alu" - must be a unique alpha-numeric value. "upc" - must be a unique numeric value. "style" - can be a shared value, with a group value. example "Classic Apparel" "price" - must be a number value contain price. example "99.99" "colour" , "size" , "extra" - can be used to store any attribute value, and not necessarily just color, size.  Once uploaded the attribute label display name is editable in the cloud dashboard. "type" - the default value for this is "regular" in Senitron, and not required to be uploaded.  The type values in Senitron are used to enforce various rules, for automate processing of certain conditions. Example "regular" items may switch to pending visibility status if not seen for 1 week, Versus, "high-value" items which may change to "Pending Visibility" If they have not been seen for a few hours. The value for this, can not be text, must be the Senitron DB Item which is visible. "tota_qty" - is the universal default replenishment value for an item, regardless of the location.
  • 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 4: Upload via the Web Interface

You ma