Supplychain

All suplplychain endpoints have path prefix /supplychain-service.

Brand

Create New Brand

Takes JSON object containing unique brand name and URL of brand logo image.

POST  /supplychain-service/brands
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
name string Brand name
logo string Img url on our S3 bucket
Example Response
{
  "id": "Koalabi Australia",
  "logo": "http://dev-cdn.shping.com.s3.amazonaws.com/koalabi.png",
  "owner": "urn:epc:sgln:0614141.12345.1",
  "approved": false
}

Update Brand

Currently, only brand logo URL can be changed. Takes JSON object containing URL of brand logo image. Brand that was already approved by parent participant couldn't be changed.

PUT /supplychain-service/brands/:id
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
id string Brand identifier, unique brand name
logo string Img url on our S3 bucket
Example Response
{
  "id": "Koalabi Australia",
  "logo": "http://dev-cdn.shping.com.s3.amazonaws.com/koalabi.png",
  "owner": "urn:epc:sgln:0614141.12345.1",
  "approved": false
}

Approve Brand

Approve brand created by a child participant. No body required in the request.

PUT /supplychain-service/brands/:id/approved
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
id string Brand identifier, unique brand name
Example Response
{
  "id": "Koalabi Australia",
  "logo": "http://dev-cdn.shping.com.s3.amazonaws.com/koalabi-large.png",
  "owner": "urn:epc:sgln:0614141.12345.1",
  "approved": true
}

GTIN

You can find information about gtin create/update/delete in "description-service" section.

Note about delete:

Delete information source from the trade item. Source will be deleted if it's conditions agree with provided conditions.

WARNING! When the last source will be deleted, the trade item will be automatically deleted to.

Marketing Profile

Create New Marketing Profile

Takes JSON object containing marketing profile name, a set of conditions and a list of widgets.

POST /supplychain-service/marketing_profiles
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
name string Marketing profile name
language string Language code in ISO format
countries array::string Countries codes
genders array::string e.g. ["male", "unknown"]
min_age number Min age
max_age number Max age
min_date string e.g. "2016-12-19"
max_date string e.g. "2016-12-29"
min_scans number Min scans
max_scans number Max scans
register_methods array::string e.g. ["email", "facebook"]
widgets array:object Array of widgets
Example Response
{
  "countries": [
    "036",
    "643"
  ],
  "genders": [
    "male",
    "unknown"
  ],
  "id": "urn:epc:id:gdti:123.3.842393846914558",
  "language": "en",
  "max_age": 30,
  "max_date": "2016-12-25",
  "max_scans": 15,
  "min_age": 14,
  "min_date": "2016-12-19",
  "min_scans": 0,
  "name": "Xyz",
  "owner": "urn:epc:sgln:0614141.12345.1",
  "register_methods": [
    "email",
    "facebook"
  ],
  "widgets": [
    {
      "header": {
        "text": "Xyz!"
      }
    },
    {
      "text": {
        "lines": 2,
        "text": "B",
        "title": "A"
      }
    }
  ]
}

Attach Marketing Profile to a Trade Item

Attaches requested marketing profile to the trade item. Takes JSON object containing marketing profile identifier.

POST /supplychain-service/gtins/:id/marketing_profiles
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
id string Marketing profile id

Distribution

Create distributor

Create distributor with retailers, products. User must be supply_chain_admin.

POST /supplychain-service/distribution/distributor
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
id string -
company_prefix string Company prefix
name string -
gln string -
country string -
city string -
address string -
store_type string -
assigned_products array -
assigned_retailers array -

Create retailer

Create retailer with assigned products. User must be supply_chain_admin

POST /supplychain-service/distribution/retailer
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
id string -
company_prefix string Company prefix
name string -
gln string -
country string -
city string -
address string -
store_type string -
assigned_products array -

results matching ""

    No results matching ""