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,
"budget": null
}
Edit participant profile
Current participant may edit the profile. The following parameters may be specified in request body:
name
— participant's name.country
,post_code
,state
,city
,address
— participant's address.email
— contact email address.phone
— contact phone number.contact
— contact person's name.facebook_url
— link to participant's Facebook profile.utc_time_zone
— UTC offset in hours (deprecated)gln
— GLN.external_id
— arbitrary external identifier.logo
— link to participant's logo.authentic_barcodes
— serialized GTINs of participant will have "Authentic Barcode" status when scanned.exclusive_info
— affects sources visibility in scans of products owned by participant. Only sources by participant will be visible iftrue
.api_domains
— list of participant domains from which Shping API will be requested for reviews etc.timezone_code
— timezone code.budget
— budget value (null
or non_neg_int).
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",
"timezone_code":"Europe/Samara",
"logo":"http://dev-cdn.shping.com.s3.amazonaws.com/file2.png",
"facebook_url": "facebook.com/12345",
"budget": null,
"api_domains": [
"example.com",
"products.example.com"
]
}
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",
"timezone_code":"Europe/Samara",
"budget": null
}
Add participant
Create participant. Only system participant is allowed to create new
participants directly. Accepts JSON object with fields
company_prefix
(list of company prefixes for participant (prefix may
be "*"
)), participant_type
(expert
, manufacturer
, partner
,
product360
), name
(participant name) and country
(participant
country code). Responds with JSON representation of newly created
participant.
POST /participant-service/participants
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket |
header | Required: Session's ticket |
Example Request
{
"name": "ACO Expert",
"company_prefix": [
"999949384",
"999949529"
],
"participant_type": "expert",
"country": "036"
}
Example Responce
{
"company_prefix": [
"999949384",
"999949529"
],
"country": "036",
"id": "urn:authenticateit:participant:73082866710077",
"name": "ACO Expert",
"parent": "urn:authenticateit:participant:1",
"participant_type": [
"expert"
]
}
Create serialization issuer
Create issuer participant. Current user will be nominated to new issuer participant. Issuer participant could not make new issuer.
POST /participant-service/participants
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket |
header | Required: Session's ticket |
name |
body | Required: Issuer name |
inn |
body | Required: Issuer inn |
country |
body | Required: Issuer country |
issuer |
body | Required: Should be true |
Example Request
{
"name": "Test issuer",
"inn": "1234567890",
"country": "036",
"issuer": true
}
Example Responce
{
"company_prefix": [
"*"
],
"country": "036",
"id": "urn:authenticateit:participant:214910731629879",
"inn": "1234567890",
"issuer": true,
"modules": [
"product360",
"serialization",
"supply_chain"
],
"name": "Test issuer",
"packaging": {
"container_company_prefix": [
"*"
],
"item_company_prefix": [
"*"
]
},
"parent": "urn:authenticateit:participant:735879621218609",
"participant_type": [
"product360"
],
"sscc_company_prefix": "1234567890"
}
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.
Update library of contexts for T&T Operator access. System only
System can configure context list for any participant.
POST /participant-service/t&t/context
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | header | Required: Session's ticket |
context | [string] | Required: List of contexts |
id | string | Required: Participant Id |
Example Request
{
"context": [{"id":"test1", "inn":"7704098732"}, {"id":"test3", "inn":"7705788023"}],
"id": "urn:authenticateit:participant:804355519238230"
}
Example Response
{
"list": [
{
"id": "test1",
"inn": "7704098732"
},
{
"id": "test3",
"inn": "7705788023"
}
]
}
Read library of contexts for T&T Operator access
System can read context for any participant by id
value. Participant can read only self context list (id
parameter will be ignored)
GET /participant-service/t&t/context
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | header | Required: Session's ticket |
id | string | Participant Id (Required: for system) |
Example Response
{
"list": [
{
"id": "coty",
"inn": "7704098732",
"participant_id": "urn:authenticateit:participant:399530525345285"
},
{
"id": "seldico",
"inn": "7734170383",
"participant_id": "urn:authenticateit:participant:804355519238230"
},
{
"id": "shiseido",
"inn": "7705788023",
"participant_id": "urn:authenticateit:participant:834104793122303"
},
{
"id": "loreal",
"inn": "7726059896",
"participant_id": "urn:authenticateit:participant:207527590306155"
},
{
"id": "chanel",
"inn": "7702331790",
"participant_id": "urn:authenticateit:participant:158090513168288"
}
]
}
Set/Remove predefined contexts for T&T Operator
POST /participant-service/team/t&t/context
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | header | Required: Session's ticket |
id | string | Required: User Id |
context | [string] | Required: List of contexts |
Example Request. Set contexts
{
"id": "urn:authenticateit:user:nickname:735879621218619:TT5",
"context":["test1", "test3"]
}
Example Response. Set contexts
{
"context": [
"test1",
"test3"
],
"id": "urn:authenticateit:participant:735879621218619",
"name": "User Name",
"roles": [
"product_line",
"report_viewer",
"reviews_admin",
"rewards_admin",
"security_admin",
"serialization_admin",
"serialization_viewer",
"supply_chain_admin"
]
}
Example Request. Remove contexts
{
"id": "urn:authenticateit:user:nickname:735879621218619:TT5",
"context":[]
}
Example Response. Remove contexts
{
"id": "urn:authenticateit:participant:735879621218619",
"name": "User Name",
"roles": [
"product_line",
"report_viewer",
"reviews_admin",
"rewards_admin",
"security_admin",
"serialization_admin",
"serialization_viewer",
"supply_chain_admin"
]
}
Set active context by user
PUT /participant-service/team/t&t/context/active
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | header | Required: Session's ticket |
id | string or null |
Required: Active context Id (null for reset) |
Example Request
{
"id":"test1"
}
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 | Admin , Content Writer , Moderator (for system only) or T&T Operator |
context | [string] | Predefined contexts for T&T Operator |
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) or "T&T Operator" |
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"
},
{
"access_type": "T&T Operator",
"context": [
"test1"
],
"first_name": "TT3",
"id": "urn:authenticateit:user:nickname:735879621218619:TT3",
"last_access": null,
"last_name": "TT3",
"roles": [
"product_line",
"report_viewer",
"serialization_admin",
"serialization_viewer"
],
"ts": "2020-05-22T11:32:37Z"
}
]
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 | Required: Brand name |
logo |
null or string |
Brand logo |
owner |
string | Only for system. To assign brand owner |
budget |
null or non_neg_int |
Brand budget |
Example Request
{
"name": "Ethertest_t_5",
"logo": "http://dev-cdn.shping.com.s3.amazonaws.com/Ethertest_t_5.png",
"owner": "urn:authenticateit:participant:735879621218609",
"budget": null
}
Example Response
{
"approved": false,
"budget": null,
"logo": "http://dev-cdn.shping.com.s3.amazonaws.com/Ethertest_t_5.png",
"name": "Ethertest_t_5",
"owner": "urn:authenticateit:participant:735879621218609"
}
Update Brand
Currently, only brand logo URL can be changed. Takes JSON object
containing name
of the brand and URL of brand logo image. Brand that
was already approved by parent participant couldn't be changed.
POST /participant-service/brands/update
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket |
header | Required: Session's ticket |
name |
string | Required: Brand name |
logo |
null or string |
Brand logo |
owner |
string | Only for system. To assign brand owner |
budget |
null or non_neg_int |
Brand budget |
Example Request
{
"name": "Ethertest_t_1",
"logo": "http://dev-cdn.shping.com.s3.amazonaws.com/Ethertest_t_1.png",
"owner": "urn:authenticateit:participant:1",
"budget":20000
}
Example Response
{
"approved": false,
"budget": 20000,
"logo": "http://dev-cdn.shping.com.s3.amazonaws.com/Ethertest_t_1.png",
"name": "Ethertest_t_1",
"owner": "urn:authenticateit:participant:735879621218609",
"portfolio": "brand_portfolio:346849c3-46d5-46ec-84e0-05195bc3d1c2"
}
Delete Brand
Participant may delete own brands, which were not yet approved. Brand
name
must be sent in the request body.
POST /participant-service/brands/delete
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket |
header | Required: Session's ticket |
Example Request
{
"name": "Koalabi Australia"
}
Approve Brand
Approve brand created by a child participant. Brand is identified by
name
in the request body.
POST /participant-service/brands/approve
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket |
header | Required: Session's ticket |
Example Request
{
"name": "Koalabi Australia"
}
Example Response
{
"name": "Koalabi Australia",
"logo": "http://dev-cdn.shping.com.s3.amazonaws.com/koalabi2.png",
"owner": "urn:epc:sgln:0614141.12345.1",
"approved": true
}
Read Brands
Read list of brands.
Number of returned brands may be limited with the limit
parameter
(default valus is 100
). Number of brands may be skipped from the
list with the offset
parameter (0
by default).
Returned brands may be filtered by approved
status. System
participant receives brands of all participants, and may filter the
list of brands by owner
participant.
The resulting list is sorted by the brand name.
GET /participant-service/brands
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket |
header | Required: Session's ticket |
offset |
Skip number of brands from the resulting list. | |
limit |
Limit the number of brands in the resulting list. | |
approved |
Only approved/not approved brands. | |
owner |
Applicable only for system. Only brands owned by this participant |
Example Response
{
"brands": [
{
"approved": false,
"budget": 20000,
"logo": "http://dev-cdn.shping.com.s3.amazonaws.com/Ethertest_t_1.png",
"name": "Ethertest_t_1",
"owner": "urn:authenticateit:participant:735879621218609",
"portfolio": "brand_portfolio:346849c3-46d5-46ec-84e0-05195bc3d1c2",
"portfolio_name": "Ethertest portfolio1"
},
{
"approved": false,
"budget": null,
"logo": "http://dev-cdn.shping.com.s3.amazonaws.com/Ethertest_t_1.png",
"name": "Ethertest_t_2",
"owner": "urn:authenticateit:participant:735879621218609",
"portfolio": "brand_portfolio:346849c3-46d5-46ec-84e0-05195bc3d1c2",
"portfolio_name": "Ethertest portfolio1"
},
{
"approved": false,
"budget": 20000,
"logo": "http://dev-cdn.shping.com.s3.amazonaws.com/Ethertest_t_1.png",
"name": "Ethertest_t_3",
"owner": "urn:authenticateit:participant:735879621218609",
"portfolio": null,
"portfolio_name": null
},
{
"approved": null,
"budget": null,
"logo": null,
"name": "Ethertest3",
"owner": "urn:authenticateit:participant:735879621218609",
"portfolio": null,
"portfolio_name": null
}
],
"count": 4,
"limit": 100,
"offset": 0
}
Brand Portfolio
Create portfolio
POST /participant-service/portfolio
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket |
header | Required: Session's ticket |
name |
string | Required: Portfolio name |
brands |
list | Required: List of brands |
owner |
string | Only for system. To assign owner |
budget |
null or non_neg_int |
Portfolio budget |
Example Request
{
"name": "Ethertest portfolio",
"owner": "urn:authenticateit:participant:735879621218609",
"brands":["Ethertest_t_2","Ethertest_t_3","Ethertest_t_1"],
"budget":10000
}
Example Response
{
"brands": [
"Ethertest_t_2",
"Ethertest_t_3",
"Ethertest_t_1"
],
"budget": 10000,
"created_by": "urn:authenticateit:participant:1",
"id": "brand_portfolio:e9f1f654-3067-486b-9761-c4775d7d951d",
"name": "Ethertest portfolio",
"owner": "urn:authenticateit:participant:735879621218609",
"type": "brand_portfolio"
}
Update portfolio
PUT /participant-service/portfolio
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket |
header | Required: Session's ticket |
id |
string | Required: Portfolio Id |
name |
string | Portfolio name |
brands |
list | List of brands |
budget |
null or non_neg_int |
Portfolio budget |
Example Request
{
"id": "brand_portfolio:e9f1f654-3067-486b-9761-c4775d7d951d",
"name": "New name",
"brands": [
"Ethertest_t_3",
"Ethertest_t_1"
],
"budget": 20000
}
Example Response
{
"brands": [
"Ethertest_t_3",
"Ethertest_t_1"
],
"budget": 20000,
"created_by": "urn:authenticateit:participant:1",
"id": "brand_portfolio:e9f1f654-3067-486b-9761-c4775d7d951d",
"name": "New name",
"owner": "urn:authenticateit:participant:735879621218609",
"type": "brand_portfolio"
}
Delete portfolio
DELETE /participant-service/portfolio/:id
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket |
header | Required: Session's ticket |
id |
string | Required: Portfolio Id |
Read portfolio
GET /participant-service/portfolio/:id
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket |
header | Required: Session's ticket |
id |
string | Required: Portfolio Id |
Example Response
{
"brands": [
"Ethertest_t_2",
"Ethertest_t_3",
"Ethertest_t_1"
],
"budget": 10000,
"created_by": "urn:authenticateit:participant:1",
"id": "brand_portfolio:81f54632-1571-47c2-97e6-f137c5205c0a",
"name": "Ethertest portfolio",
"owner": "urn:authenticateit:participant:735879621218609",
"type": "brand_portfolio"
}
Read portfolio list
GET /participant-service/portfolio
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket |
header | Required: Session's ticket |
offset |
Skip number of portfolios from the resulting list. | |
limit |
Limit the number of portfolios in the resulting list. | |
owner |
Applicable only for system. Only portfolios owned by this participant |
Example Response
{
"count": 1,
"limit": 100,
"list": [
{
"budget": 10000,
"id": "brand_portfolio:81f54632-1571-47c2-97e6-f137c5205c0a",
"name": "Ethertest portfolio",
"owner": "urn:authenticateit:participant:735879621218609"
}
],
"offset": 0
}
Brand Attachments
Attach GDTIs to a Brand
Link approved brand to existing GDTI documents. Request body must have
brand name
and attachments
list of document identifiers . Responds
with updated attachments
list of the brand.
Brand attachment positions may be overriden with
attachment_positions
in the request body. See product
attachments API description for more
information on attachment positions.
POST /participant-service/brands/attachments/add
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket |
header | Required: Session's ticket |
Example Request
{
"name": "Wild Brand",
"attachments": [
"urn:epc:id:gdti:0000.00000005.004803474973806",
"urn:epc:id:gdti:0000.00000005.004819191780015"
],
"attachment_positions": {
"urn:epc:id:gdti:0000.00000005.004803474973806": 1,
"urn:epc:id:gdti:0000.00000005.004819191780015": null
}
}
Example Response
[
"urn:epc:id:gdti:0000.00000005.004803474973806",
"urn:epc:id:gdti:0000.00000005.004819191780015"
]
Detach GDTIs from a Brand
Unlink brand from GDTI documents. Request body must have brand name
and attachments
list of document identifiers to be
detached. Responds with updated attachments
list of the brand.
Attachment positions for the detached GDTIs will also be removed.
Positions for selected brand attachments may be removed by providing
attachment_positions
in the request body. See product
attachments API description for more
information.
POST /participant-service/brands/attachments/remove
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket |
header | Required: Session's ticket |
Example Request
{
"name": "Wild Brand",
"attachments": [
"urn:epc:id:gdti:0000.00000005.004819191780015"
],
"attachment_positions": {
"urn:epc:id:gdti:0000.00000005.004803474973806": null
}
}
Example Response
[
"urn:epc:id:gdti:0000.00000005.004803474973806"
]
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 participant fields.
There are fields for child participant's address (all required):
country
(country code)post_code
state
city
address
time_zone
(UTC offset in minutes; e.g., +03:00 is 180)
Supply chain related fields (all required):
type
(distributor
orretailer
)company_prefix
(list of company prefixes for the participant)gln
products
(non-empty list of associated GTINs)name
Fields for participant contact information:
phone
email
contact
(name of a person to contact)
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"
]
}
Import Participants
Create child distributor or retailer for current participant.
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.
POST /participant-service/supply_chain/import
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket |
header | Required: Session's ticket |
user_id |
string | Nominated user |
list |
object | Required: List for import |
shipment_reg_mode
parameter inside list is optional and should be set to one of values: 010
, 020
, 030
, 031
, 040
, 050
, 060
, 070
, 080
, 090
transfer_type
parameter inside list is optional and should be set to one of values: 1
or 0
sscc_document
parameter inside list is optional and should be set to one of values: 1
or 0
Example Request
{
"user_id": "urn:authenticateit:user:email:test@test.com",
"list": [
{
"type": "distributor",
"external_id": "0",
"inn": "6027088229",
"shipment_reg_mode": "030",
"withdrawal_type": "Some Type",
"name": "ООО \"Вернисаж\"",
"transfer_type" :"1",
"sscc_document":"0"
},
{
"type": "distributor",
"external_id": "000050",
"inn": "7810912625",
"shipment_reg_mode": "020",
"name": "ЗАО \"Ленрианта\""
}
]
}
Example Response
{
"id": "154b246b-8fd9-4bd0-8ff2-f53db556c32e"
}
Import status
GET /participant-service/supply_chain/import/:id
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket |
header | Required: Session's ticket |
id |
url | Required: Import Id |
Example Response
{
"status": "success"
}
Example Response
{
"status": "failed"
}
Example Response
{
"status": "pending"
}
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
).
Number of returned participants may be limited with the limit
parameter
(default valus is 100
). Number of participants may be skipped from the list
with the offset
parameter (0
by default).
Returned participants may be filtered by type
(distributor
or
retailer
), external_id
, company_prefix
(supply chain participant
must have all of the specified prefixes to be included in the
response), name
, gln
, country
, post_code
, state
, city
,
address
, contact
, phone
, email
, products
(supply chain
participant must have all of the specified GTINs associated to be
included in the response).
The resulting list may be sorted. Parameter sort_by
should be used
to specify sorting field (external_id
, name
, gln
, country
,
post_code
, state
, city
, address
, contact
, time_zone
,
phone
and email
). Sorting order may be specified with sort_order
parameter (asc
for ascending order and desc
for descending order).
GET /participant-service/supply_chain/participants
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket |
header | Required: Session's ticket |
type |
string | distributor or retailer |
offset |
Skip number of participants from the resulting list. | |
limit |
Limit the number of participants in the resulting list. | |
external_id |
Only participants with this external identifier. | |
company_prefix |
Only participants with all of these prefixes. | |
name |
Only participants with name matching this string. | |
gln |
Only participants with this GLN. | |
country |
Only participants with this country code. | |
post_code |
Only participants with this post code. | |
state |
Only participants with state mathching this string. | |
city |
Only participants with city matching this string. | |
address |
Only participants with address matching this string. | |
contact |
Only participants with contact name matching this string. | |
phone |
Only participants with this phone number. | |
email |
Only participants with email address matching this string. | |
products |
Only participants with all of these products associated. | |
sort_by |
Sort participants by field. | |
sort_order |
Ascending or descending sort order. |
Example Response
{
"participants": [
{
"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"
]
}
],
"sort_by": "id",
"sort_order": "asc",
"offset": 0,
"limit": 100
}
Read Participant Business Locations
Read list of children distributors or retailers, but instead of
participant details include business_locations
list for each child
participant. See business locations API for description of location
JSON representation. Parameter type
may be used to return only
business locations for participants of the specified type
(distributor
or retailer
).
GET /participant-service/supply_chain/business_locations
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket |
header | Required: Session's ticket |
type |
string | distributor or retailer |
Example Response
{
"participants": [
{
"id": "urn:authenticateit:participant:655831267204784",
"business_locations": [
{
"id": "2c2a486e-8b3f-4a61-a9ac-8400ffa4df73",
"sub_site_type": "207",
"name": "Storage Area",
"address": "Portovaya, 14",
"city": "Novorossiysk",
"state": "Krasnodar krai",
"post_code": "353909",
"country": "643",
"latitude": 44.7368214,
"longitude": 37.7784576,
"accuracy": 756
},
{
"id": "8a62195e-964d-46d5-a6bd-76fcdf330def",
"sub_site_type": "206",
"name": "Xyz",
"address": "Portovaya, 14",
"city": "Novorossiysk",
"state": "Krasnodar krai",
"post_code": "353909",
"country": "643",
"latitude": 44.7368214,
"longitude": 37.7784576,
"accuracy": 827
}
]
},
{
"id": "urn:authenticateit:participant:954339092655685",
"business_locations": []
}
]
}
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
Create Location
Create a business location for 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
(EPC global sub-site type
code), name
(location name). All fields are required.
Also could be set another optional fields:
url
, zone_id
, rrule
, alias
, location_type
(one of online_store
,retailer_store
,other
),
gln
Participant can create business locations for it's immediate child
supply chain participants. Identifier of child participant should be
provided in owner
parameter in this case.
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": 44736821,
"longitude": 37778457,
"accuracy": 378,
"url": "www.shping.com",
"rrule": "RRULE:FREQ=WEEKLY;BYDAY=WE,SA",
"alias": "WOOLOWRTHS-BRIGHTON",
"location_type": "online_store"
}
Example Response
{
"accuracy": 378,
"address": "Elevatornaya, 22",
"alias": "WOOLOWRTHS-BRIGHTON",
"city": "Novorossiysk",
"country": "643",
"id": "urn:authenticateit:business_location:9f4956c6-6f95-4cb7-9820-fd1b9fd952e3",
"latitude": 44736821,
"location_type": "online_store",
"longitude": 37778457,
"name": "Storage Area",
"owner": "urn:authenticateit:participant:1",
"post_code": "353909",
"rrule": "RRULE:FREQ=WEEKLY;BYDAY=WE,SA",
"state": "Krasnodar krai",
"sub_site_type": "207",
"url": "www.shping.com"
}
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": "207",
"name": "Storage Area",
"address": "Elevatornaya, 22",
"city": "Novorossiysk",
"state": "Krasnodar krai",
"post_code": "353909",
"country": "643",
"latitude": 44736821,
"longitude": 37778457,
"accuracy": 378,
"url": "www.shping.com",
"rrule": "RRULE:FREQ=WEEKLY;BYDAY=WE,SA",
"alias": "WOOLOWRTHS-BRIGHTON",
"location_type": "online_store",
"gln": "GLN"
}
Example Response
{
"accuracy": 378,
"address": "Elevatornaya, 22",
"alias": "WOOLOWRTHS-BRIGHTON",
"city": "Novorossiysk",
"country": "643",
"gln": "GLN",
"id": "urn:authenticateit:business_location:9f4956c6-6f95-4cb7-9820-fd1b9fd952e3",
"latitude": 44736821,
"location_type": "online_store",
"longitude": 37778457,
"name": "Storage Area",
"owner": "urn:authenticateit:participant:1",
"post_code": "353909",
"rrule": "RRULE:FREQ=WEEKLY;BYDAY=WE,SA",
"state": "Krasnodar krai",
"sub_site_type": "207",
"url": "www.shping.com"
}
Read Locations
Read list of participant's business locations.
Number of returned locations may be limited with the limit
parameter
(default valus is 100
). Number of locations may be skipped from the list
with the offset
parameter (0
by default).
Returned locations may be filtered by sub_site_type
, name
,
address
, city
, state
, post_code
, country
, zone_id
, alias
,
location_type
and gln
The resulting list may be sorted. Parameter sort_by
should be used
to specify sorting field (sub_site_type
, name
, address
, city
,
state
, post_code
, country
, zone_id
, alias
, location_type
or gln
).
Sorting order may be specified
with sort_order
parameter (asc
for ascending order and desc
for
descending order).
There is a parameter retrieve
to control which locations to
return. If it's value is own
(the default value), participant's own
business locations will be retrieved. If it's value is child
,
business locations of immediate child supply chain participant will be
retrieved. If it's all
both own and child locations will be present
in the response.
GET /participant-service/business_locations
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket |
header | Required: Session's ticket |
offset |
Skip number of locations from the resulting list. | |
limit |
Limit the number of locations in the resulting list. | |
sub_site_type |
Only locations with this sub-site type. | |
name |
Only locations with name matching this string. | |
address |
Only locations with address mathching this string. | |
city |
Only with city matching this string. | |
state |
Only with state mathching this string. | |
post_code |
Only locations with this post code. | |
country |
Only locations with this country code. | |
zone_id |
Only locations with this zone_id | |
alias |
Only locations with alias matching this string. | |
location_type |
Only locations with this location_type | |
gln |
Only locations with this gln | |
sort_by |
Sort locations by field. | |
sort_order |
Ascending or descending sort order. | |
retrieve |
Retrieve own , child or all locations. |
Example Response
{
"business_locations": [
{
"accuracy": 378,
"address": "Elevatornaya, 22",
"alias": "WOOLOWRTHS-BRIGHTON",
"city": "Novorossiysk",
"country": "643",
"gln": "GLN",
"id": "urn:authenticateit:business_location:9f4956c6-6f95-4cb7-9820-fd1b9fd952e3",
"latitude": 44736821,
"location_type": "online_store",
"longitude": 37778457,
"name": "Storage Area",
"owner": "urn:authenticateit:participant:1",
"post_code": "353909",
"rrule": "RRULE:FREQ=WEEKLY;BYDAY=WE,SA",
"state": "Krasnodar krai",
"sub_site_type": "207",
"type": "business_location",
"url": "www.shping.com"
}
],
"count": 1,
"limit": 100,
"offset": 0,
"retrieve": "own",
"sort_by": "id",
"sort_order": "asc"
}
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 |
Serialized Products Reassignment
Create Reassignment Task
Reassign set of serialized products to a new supply chain participant. Takes JSON object containing reassignment description.
Products are selected from current participant's serialized products
indexing table
with a query
. See RSQL API from Index service for
description of table
, query
and op
parameters. Indexing table
must be of sgtin
, lgtin
or slgtin
type.
To specify new owner of serialized products, use location
or
participant
parameters. If participant
provided, it must be
identifier of a child supply chain participant. If location
is
specified, it must be business location identifier and location's
owner will be used as participant
.
Responds with JSON representation of newly created reassignment
task. Task has id
which should be used to query task status and
progress. Field count
in task representation will contain total
number of products selected for reassignment.
POST /participant-service/supply_chain/reassignments
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket |
header | Required: Session's ticket |
Example Request
{
"table": "index_schema_table_slgtin_aeb5afdf-aa5c-439c-b20d-9504bebf7ecf",
"query": "id==urn:epc:id:sgtin:084556643.0001.000000000000044;id==urn:epc:id:sgtin:084556643.0001.000000000000043;id==urn:epc:id:sgtin:084556643.0001.000000000000042",
"op": "OR",
"participant": "urn:authenticateit:participant:868695661420695"
}
Example Response
{
"id": "44ff192c-a88d-4089-a534-5f66beafcc78",
"created": "2018-05-14T21:33:51Z",
"count": 3,
"progress": 0
}
Read Reassignment Task
Query reassignment task status and progress.
GET /participant-service/supply_chain/reassignments/:id
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket |
header | Required: Session's ticket |
id |
Reassignment task identifier. |
Example Response
{
"count": 3,
"created": "2018-05-14T21:33:51Z",
"end_time": "2018-05-14T21:33:53Z",
"id": "44ff192c-a88d-4089-a534-5f66beafcc78",
"op": "OR",
"owner": "urn:authenticateit:participant:266730991497899",
"participant": "urn:authenticateit:participant:868695661420695",
"progress": 3,
"query": "id==urn:epc:id:sgtin:084556643.0001.000000000000044;id==urn:epc:id:sgtin:084556643.0001.000000000000043;id==urn:epc:id:sgtin:084556643.0001.000000000000042",
"real_ip": "95.211.138.15",
"start_time": "2018-05-14T21:33:51Z",
"status": "done",
"table": "index_schema_table_slgtin_aeb5afdf-aa5c-439c-b20d-9504bebf7ecf",
"user_agent": "curl/7.52.1"
}
Brand Constraints
Current participant must be system to access this API. Only
participants of type product360
may have constraints.
Read Constraints
Read brand constraints for the specified participant. Responds with
JSON object containing lists of countries
and products
. Each
product has id
(GTIN) and name
(may be null
if name is unknown).
GET /participant-service/participants/:id/constraints
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket |
header | Session ticket. |
id |
string | Participant identifier. |
Example Response
{
"countries": [
"036"
],
"products": [
{
"id": "09212345000015",
"name": "Muesli Bar 185g"
},
{
"id": "09212345000022",
"name": null
}
]
}
Set Constraints
PUT /participant-service/participants/:id/constraints
Set brand constraints for the participant. Takes JSON object with
optional countries
and products
lists. To clear the constraint,
set it to null
.
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket |
header | Session ticket. |
id |
string | Participant identifier. |
Example Request
{
"countries": null,
"products": [
"09212345000022",
"09212345000015"
]
}
Add Constraints
Add to the existing constraints of the participant. Takes JSON object
with optional lists of countries
and products
to add.
POST /participant-service/participants/:id/constraints/add
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket |
header | Session ticket. |
id |
string | Participant identifier. |
Example Request
{
"countries": [
"643"
],
"products": [
"09212345000220"
]
}
Remove Constraints
Remove from existing constraints of the participant. Takes JSON object
with optional lists of countries
and products
to remove.
POST /participant-service/participants/:id/constraints/remove
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket |
header | Session ticket. |
id |
string | Participant identifier. |
Example Request
{
"countries": [
"643"
],
"products": [
"09212345000015"
]
}