Participants

Read participant profile

Read current participant profile

GET /participant-service/users/participant
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
Example Response
{
  "address": "Some Str.",
  "city": "Some City",
  "company_prefix": [
    "00000935254"
  ],
  "contact": "ContactName",
  "country": "036",
  "email": "foo@bar.ru",
  "external_id": "321",
  "facebook_url": "facebook.com/12345",
  "gln": "123",
  "name": "Name",
  "parent": "urn:authenticateit:participant:1486463259613",
  "participant_type": [
    "manufacturer",
    "system"
  ],
  "logo": "http://dev-cdn.shping.com.s3.amazonaws.com/file2.png",
  "phone": "+7919186733",
  "post_code": "1234",
  "state": "Some State",
  "utc_time_zone": 12
}

Edit participant profile

Current participant may edit the profile

PUT /participant-service/users/participant
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
Example Request
{
  "name": "Name",
  "address": "Some Str.",
  "city": "Some City",
  "country": "036",
  "contact": "ContactName",
  "phone": "+7919186733",
  "email": "foo@bar.ru",
  "gln": "123",
  "external_id": "321",
  "state": "Some State",
  "post_code": "1234",
  "utc_time_zone": 12,
  "logo":"http://dev-cdn.shping.com.s3.amazonaws.com/file2.png",
  "facebook_url": "facebook.com/12345"
}
Example Response
{
  "address": "Some Str.",
  "city": "Some City",
  "company_prefix": [
    "00000935254"
  ],
  "contact": "ContactName",
  "country": "036",
  "email": "foo@bar.ru",
  "external_id": "321",
  "facebook_url": "facebook.com/12345",
  "gln": "123",
  "name": "Name",
  "parent": "urn:authenticateit:participant:1486463259613",
  "participant_type": [
    "manufacturer"
  ],
  "phone": "+7919186733",
  "post_code": "1234",
  "state": "Some State",
  "utc_time_zone": 12
}

Add participant

Participant types: product360, manufacturer, expert, partner

POST /participant-service/participants
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
Example Request
{
  "company_prefix": "“999949384",
  "id": "urn:epc:sgln:0614141.12345.1",
  "participant_type": "manufacturer",
  "name": "Ugg",
  "country": "Australia"
}

Get participants

GET /participant-service/users/participants
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket

Delete participant

DELETE /participant-service/participant/:participant_id
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket

Update? participant

POST /participant-service/users/participant
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
Example Request
{
    "id": "urn:epc:sgln:0614141.12345.1",
    "name": "Ugg",
    "country" : "Australia"
}

Participant's team

The section describes methods for working with a participant's team. Already nominated user with role “security_admin” can add other user to registered participant.

Add/update user

Current user can add other registered users to team. Method must be used for invite user to participant's team or update user in team

POST /participant-service/team
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
id string email, facebook id, system id
access_type string Possible values: “Admin”, “Content Writer”, “Moderator” (for system participant only)
Example Response
[
  {
    "access_type": "Content Writer",
    "first_name": "Sveta",
    "id": "urn:authenticateit:user:email:my2@gmail.com",
    "last_access": null,
    "last_name": "LastName",
    "ts": "2017-03-24T09:21:50Z"
  },
  {
    "access_type": "Admin",
    "id": "urn:authenticateit:user:email:foo@bar.com",
    "last_access": "2017-03-24T09:12:41Z",
    "ts": "2017-03-24T09:11:47Z"
  }
]

Add/update user with specified roles

Current user can add other registered users to team with specified roles.

POST /participant-service/team
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
id string email, facebook id, system id
access_type string Possible values: “Admin”, “Content Writer”, “Moderator” (for system participant only)
user_roles array::string User's roles
Example Response
[
  {
    "access_type": "Content Writer",
    "first_name": "n",
    "id": "urn:authenticateit:user:email:2qw@mailinator.com",
    "last_access": null,
    "last_name": "n",
    "roles": [
      "contributors_moderator"
    ],
    "trusted_level": 1,
    "trusted_rating": 0,
    "ts": "2017-06-22T09:12:47Z"
  },
  {
    "access_type": "Admin",
    "id": "urn:authenticateit:user:email:foo@bar.com",
    "last_access": "2017-03-24T09:12:41Z",
    "ts": "2017-03-24T09:11:47Z"
  }
]

Get participant's team

Get currents participant's team list

GET /participant-service/team
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
Example Response
[
  {
    "access_type": "Content Writer",
    "first_name": "Sveta",
    "id": "urn:authenticateit:user:email:my2@gmail.com",
    "last_access": null,
    "last_name": "LastName",
    "ts": "2017-03-24T09:21:50Z"
  },
  {
    "access_type": "Admin",
    "id": "urn:authenticateit:user:email:foo@bar.com",
    "last_access": "2017-03-24T09:12:41Z",
    "ts": "2017-03-24T09:11:47Z"
  }
]

Remove user from team

POST /participant-service/team/delete
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
id string email, facebook id, system id
Example Response
[
  {
    "access_type": "Admin",
    "id": "urn:authenticateit:user:email:foo@bar.com",
    "last_access": "2017-03-24T09:12:41Z",
    "ts": "2017-03-24T09:11:47Z"
  }
]

Brands

Create New Brand

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

POST  /participant-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 /participant-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 /participant-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
}

Marketing Profiles

Create New Marketing Profile

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

POST /participant-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 /participant-service/gtins/:id/marketing_profiles
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
id string Marketing profile id

Supply Chain

Create Participant

Create child distributor or retailer for current participant. Takes JSON object containing fields for child participant's address country (country code), city, address. Fields for participant type (distributor or retailer), company_prefix, gln, products (non-empty list of associated GTINs) and name. All fields are required. Also there may be external_id (arbitrary identifier) field for external references.

To create child distributor or retailer current participant must have active supply_chain module and must have distributor type. Also participants with module serialization can create child distributor participants.

Current user is nominated with supply_chain_admin role by newly created participant.

POST /participant-service/supply_chain/participants
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
Example Request
{
  "type": "distributor",
  "external_id": "289",
  "company_prefix": "4603721",
  "name": "Two Toy",
  "gln": "4603721111111",
  "country": "643",
  "city": "Novorossiysk",
  "address": "Portovaya, 14",
  "products": [
    "46037211111111"
  ]
}
Example Response
{
  "id": "urn:authenticateit:participant:655831267204784",
  "parent": "urn:authenticateit:participant:827735452030300",
  "participant_type": ["distributor"],
  "external_id": "289",
  "company_prefix": "4603721",
  "name": "Two Toy",
  "gln": "4603721111111",
  "country": "643",
  "city": "Novorossiysk",
  "address": "Portovaya, 14",
  "products": [
    "46037211111111"
  ]
}

Update Participant

Update child distributor or retailer participant. Takes JSON object containing fields to update (see description for Create Participant endpoint above for the list of fields).

PUT /participant-service/supply_chain/participants/:id
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
id string distributor/retailer id
Example Request
{
  "external_id": "288",
  "name": "Two Toyz"
}
Example Response
{
  "id": "urn:authenticateit:participant:655831267204784",
  "parent": "urn:authenticateit:participant:827735452030300",
  "participant_type": ["distributor"],
  "external_id": "288",
  "company_prefix": "4603721",
  "name": "Two Toyz",
  "gln": "4603721111111",
  "country": "643",
  "city": "Novorossiysk",
  "address": "Portovaya, 14",
  "products": [
    "46037211111111"
  ]
}

Read Participants

Read list of children distributors or retailers for current participant. Parameter type may be used to return only participants of the specified type (distributor or retailer).

GET /participant-service/supply_chain/participants
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
type string distributor or retailer
Example Response
[
  {
    "id": "urn:authenticateit:participant:655831267204784",
    "parent": "urn:authenticateit:participant:827735452030300",
    "participant_type": [
      "distributor"
    ],
    "external_id": "288",
    "company_prefix": "4603721",
    "name": "Two Toyz",
    "gln": "4603721111111",
    "country": "643",
    "city": "Novorossiysk",
    "address": "Portovaya, 14",
    "products": [
      "46037211111111"
    ]
  },
  {
    "id": "urn:authenticateit:participant:954339092655685",
    "parent": "urn:authenticateit:participant:827735452030300",
    "participant_type": [
      "retailer"
    ],
    "external_id": "354",
    "company_prefix": "4603721",
    "name": "Two Toyz Store",
    "gln": "4603721111111",
    "country": "643",
    "city": "Novorossiysk",
    "address": "Serebryakova, 2",
    "products": [
      "46037211111111"
    ]
  }
]

Delete Participant

Delete child distributor or retailer for current participant.

DELETE /participant-service/supply_chain/participants/:id
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
id string distributor/retailer id

Business Locations

Participant must have supply_chain module active to work with business locations.

Create Location

Create a business location for current participant. Takes JSON object containing fields for business location address: country (country code), post_code, state, city, address. Location coordinates latitude, longitude, and coordinates accuracy in metres. Other fields are sub_site_type (EPCglobal sub-site type code), name (location name). All fields are required.

POST /participant-service/business_locations
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
Example Request
{
  "sub_site_type": "207",
  "name": "Storage Area",
  "address": "Elevatornaya, 22",
  "city": "Novorossiysk",
  "state": "Krasnodar krai",
  "post_code": "353909",
  "country": "643",
  "latitude": 44.7368214,
  "longitude": 37.7784576,
  "accuracy": 378
}
Example Response
{
  "id": "9b3102d2-715a-4e1f-92a2-1ccfec7b9bd5",
  "sub_site_type": "207",
  "name": "Storage Area",
  "address": "Elevatornaya, 22",
  "city": "Novorossiysk",
  "state": "Krasnodar krai",
  "post_code": "353909",
  "country": "643",
  "latitude": 44.7368214,
  "longitude": 37.7784576,
  "accuracy": 378
}

Update Location

Update business location data. Takes JSON object containing fields to change (see Create Location endpoint for the list of fields).

PUT /participant-service/business_locations/:id
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
id string Business location id
Example Request
{
  "sub_site_type": "202"
}
Example Response
{
  "id": "9b3102d2-715a-4e1f-92a2-1ccfec7b9bd5",
  "sub_site_type": "202",
  "name": "Storage Area",
  "address": "Elevatornaya, 22",
  "city": "Novorossiysk",
  "state": "Krasnodar krai",
  "post_code": "353909",
  "country": "643",
  "latitude": 44.7368214,
  "longitude": 37.7784576,
  "accuracy": 378
}

Read Locations

Read list of participant's business locations.

GET /participant-service/business_locations
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
Example Response
[
  {
    "id": "9b3102d2-715a-4e1f-92a2-1ccfec7b9bd5",
    "sub_site_type": "202",
    "name": "Storage Area",
    "address": "Elevatornaya, 22",
    "city": "Novorossiysk",
    "state": "Krasnodar krai",
    "post_code": "353909",
    "country": "643",
    "latitude": 44.7368214,
    "longitude": 37.7784576,
    "accuracy": 378
  }
]

Delete Location

Delete participant's business location.

DELETE /participant-service/business_locations/:id
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
id string Business location id

results matching ""

    No results matching ""