PAM
Product Advance Management. All PAM endpoints have path prefix /pam-service.
Get Products
Get products list by retailer.
GET /pam-service/api/products
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | headers | Required: |
participant_id | string(params) | Required: participant id |
name | string(params) | Optional: filtering by |
brand | string(params) | Optional: filtering by |
store_id | string(params) | Optional: filtering by ("null" or "value") |
gtin | string(params) | Optional: filtering by ("null" or "value") |
has_price | string(params) | Optional: filtering by ("0" or "1") |
attributes_amount | string(params) | Optional: filtering by |
categories_amount | string(params) | Optional: filtering by |
same_products_amount | string(params) | Optional: filtering by |
country | string(params) | Optional: filtering by |
state | string(params) | Optional: filtering by |
city | string(params) | Optional: filtering by |
postcode | string(params) | Optional: filtering by |
page_size | string(params) | Optional: default value: 50 |
page_number | string(params) | Optional: |
sort_by | string(params) | Optional: |
If you want to filter by missing fields - param must be "null"
Example Response
{
"result": [
{
"id": 38,
"participant_id": "25",
"store_id": "354",
"gtin": null,
"name": "nam6",
"brand": "br3and6",
"scan_count": 0,
"has_price": 0,
"min_price": 5311,
"category1": "main",
"category2": "food",
"category3": "meat",
"attributes": null,
"locks": {
"gtin": 1,
"name": 1,
"brand": 0,
"scan_count": 0
}
},
{
"id": 39,
"participant_id": "25",
"store_id": "354",
"gtin": null,
"name": "nam6",
"brand": "br3and6",
"scan_count": 0,
"has_price": 1,
"min_price": 5311,
"category1": "main",
"attributes": [
"low fat",
"veg"
],
"locks": {}
},
{
"id": 39,
"participant_id": "25",
"store_id": "354",
"gtin": null,
"name": "nam6",
"brand": "br3and6",
"scan_count": 0,
"has_price": 1,
"min_price": 5311,
"category1": "main",
"category2": "drink",
"category3": "juice",
"category4": "orange",
"category5": "some1",
"attributes": ["veg"],
"locks": {
"gtin": 1,
"name": 0,
"brand": 1,
"scan_count": 0
}
},
],
"pages_count": 1,
"products_count": 3
}
Get Same Products
GET /pam-service/api/products/same
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | headers | Required: |
store_id | string(params) | Required: |
Example Response
[
{
"found_by": "186910",
"same_store_id": "avocados",
"same_product_name": "Avocados each"
}
]
Get prices
Get prices by product_id for the last 3 months.
GET /pam-service/api/prices
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | headers | Required: |
product_id | string(params) | Required: product id |
country | string(params) | Optional: filtering by |
state | string(params) | Optional: filtering by |
city | string(params) | Optional: filtering by |
postcode | string(params) | Optional: filtering by |
Example Response
[
{
"id": 166,
"product_id": 6,
"ts": "2020-09-20T04:00:00.000Z",
"country": "usa",
"state": "iowa",
"city": "iowa-city",
"postcode": "100",
"currency": "d",
"label": "lab",
"price": 7777
},
{
"id": 169,
"product_id": 6,
"ts": "2020-11-10T04:00:00.000Z",
"country": "usa",
"state": "iowa",
"city": "iowa-city",
"postcode": "100",
"currency": "d",
"label": "lab",
"price": 7777
},
{
"id": 170,
"product_id": 6,
"ts": "2020-09-28T04:00:00.000Z",
"country": "usa",
"state": "iowa",
"city": "iowa-city",
"postcode": "100",
"currency": "d",
"label": "lab",
"price": 7777
},
{
"id": 171,
"product_id": 6,
"ts": "2020-09-28T04:00:00.000Z",
"country": "usa",
"state": "iowa",
"city": "iowa-city",
"postcode": "100",
"currency": "d",
"label": "lab",
"price": 7760
},
{
"id": 172,
"product_id": 6,
"ts": "2020-09-28T04:00:00.000Z",
"country": "usa",
"state": "iowa",
"city": "iowa-city",
"postcode": "100",
"currency": "d",
"label": "lab",
"price": 8000
},
{
"id": 173,
"product_id": 6,
"ts": "2020-10-28T04:00:00.000Z",
"country": "usa",
"state": "iowa",
"city": "iowa-city",
"postcode": "100",
"currency": "d",
"label": "lab",
"price": 8000
},
{
"id": 174,
"product_id": 6,
"ts": "2020-11-28T04:00:00.000Z",
"country": "usa",
"state": "iowa",
"city": "iowa-city",
"postcode": "100",
"currency": "d",
"label": "lab",
"price": 8000
},
{
"id": 207,
"product_id": 6,
"ts": "2020-12-21T08:51:32.000Z",
"country": "usa",
"state": "iowa",
"city": "des moines",
"postcode": "100",
"currency": "d",
"label": "lab",
"price": 53
}
]
Update price
PATCH /pam-service/api/prices
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | headers | Required: |
id | string(params) | Required: price id |
price | string(params) | Optional: |
label | string(params) | Optional: |
Example Response
{
"result": "Price updated"
}
Get retailers
GET /pam-service/api/retailers
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | headers | Required: |
retailer_name | query | Optional: |
if the "retailer_name" param is omitted all retailers will be displayed
Example Response
[
{
"participant_id": "urn:authenticateit:participant:1",
"name": "Authenticateit Pty Ltd"
}
]
Get retailers by store id
GET /pam-service/api/retailers/store_id
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | headers | Required: |
store_id | string(param) | Optional: |
limit | string(param) | Optional: Default: 10 |
Example Response
[
{
"gtin": "04002359010279",
"product_name": "76TESTNAME",
"store_id": "3230991P",
"retailer_id": "urn:authenticateit:participant:111111111111115",
"retailer_name": "Import participant Coles"
},
{
"gtin": "07613036273770",
"product_name": "NESCAFE DOLCE GUSTO COFFEE CAPPUCCINO 16 CAPSULES 186G",
"store_id": "3208074P",
"retailer_id": "urn:authenticateit:participant:111111111111115",
"retailer_name": "Import participant Coles"
},
]
Get participant by name
GET /pam-service/api/participants
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | headers | Required: |
participant_name | string | Required: participant_name |
limit | string | Optional: |
Example Response
[
{
"id": "urn:authenticateit:participant:1",
"name": "Authenticateit Pty Ltd",
"parent": null,
"system": 1,
"partner": 0,
"product360": 0,
"manufacturer": 0,
"outsource": 0,
"distributor": 0,
"retailer": 0,
"expert": 0,
"supplier": 0,
"company_prefix": "*",
"external_id": null,
"gln": null,
"country": "036",
"post_code": null,
"state": null,
"city": "Melbourne",
"address": "10 Queens Road",
"contact": "Andrei",
"time_zone": null,
"phone": "+611111111111",
"email": "system@authenticateit.com",
"products": null,
"billing_trial_to": null,
"billing_paid_from": null,
"billing_paid_to": null,
"billing_plan": "custom",
"billing_country": null,
"api_key": "f0c39b02-aff0-414d-b905-141d6510f54f",
"api_domains": "",
"timezone_code": "Africa/Addis_Ababa"
}
]
Get Attributes
GET /pam-service/api/attributes
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | headers | Required: |
Example Response
[
{
"id": "1",
"name": "low fat"
},
{
"id": "10",
"name": "veg"
}
]
Get Categories
GET /pam-service/api/categories
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | headers | Required: |
Example Response
[
{
"id": "101",
"parent_id": "100",
"name": "food"
},
{
"id": "102",
"parent_id": "100",
"name": "drink"
},
{
"id": "1011",
"parent_id": "101",
"name": "meat"
}
]
Get Categories Tree
Get all parents by category id
GET /pam-service/api/categories/parents
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | headers | Required: |
category_id | string (params) | Required: |
Example Response
[
{
"name": "orange",
"id": "1032"
},
{
"name": "juice",
"id": "1022"
},
{
"name": "drink",
"id": "102"
},
{
"name": "main",
"id": "100"
}
]
Get Brands
GET /pam-service/api/brands
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | headers | Required: |
participant_id | string | Required: |
brand_id | string | Optional: |
limit | string | Optional: Default:10 |
Example Response
[
{
"id": "AIT Brand Case4",
"owner": "urn:authenticateit:participant:1",
"name": "https://dev-cdn.shping.com.s3.amazonaws.com/nike.png",
"logo": null,
"approved": null
},
{
"id": "BUTTON TALL BLACK 10",
"owner": "urn:authenticateit:participant:1",
"name": null,
"logo": null,
"approved": 0
}
]
Add retailer
Add retailer.
POST /pam-service/api/retailers
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | headers | Required: |
participant_id | string | Required: participant_id |
Example body
{
"participant_id":"55"
}
Example Response
{
"result": "Participant added"
}
Add category
Add category.
POST /pam-service/api/categories
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | headers | Required: |
id | string | Required: |
name | string | Optional: |
parents | array | Optional: |
Example body
{
"id": 10,
"name": "vegetables",
"parents":[ "996496b2-97d7-4236-b45c-4dba2da7270d", "2g5134g234-g34g4236-b45c-rthj432d"]
}
Example Response
{
"result": "Category added"
}
Add attribute
Add attribute.
POST /pam-service/api/attributes
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | headers | Required: |
id | string | Required: |
name | string | Required: |
Example body
{
"id":"221",
"name":"low fat"
}
Example Response
{
"result": "Attribute added"
}
Search gtin
Add attribute.
POST /pam-service/api/gtins/search
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | headers | Required: |
search_string | string | Required: (name or gtin) |
limit | string | Optional: |
Allows to search by name or gtin
Example Response
[
{
"id": "00000000000260",
"owner": "urn:authenticateit:participant:834104793122303",
"name": "RED GIFT BOX",
"brand_id": null
},
{
"id": "00000000002912",
"owner": "urn:authenticateit:participant:834104793122303",
"name": "NMU SSP SATIN L/S BANNED RED",
"brand_id": null
},
{
"id": "00000000004282",
"owner": "urn:authenticateit:participant:657635220994783",
"name": "Grapefruit Ruby Red",
"brand_id": null
}
]
Update product
PATCH /pam-service/api/products
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | headers | Required: |
product_id | string | Required: |
gtin | string | Optional: ("value" or "null") |
brand | string | Optional: ("value" or "null") |
name | string | Optional: |
scan_count | number | Optional: |
store_id | string | Optional: ("value" or "null") |
attributes | array | Optional: |
categories | array | Optional: |
product_price | string | Optional: |
product_lock | boolean | Optional: |
product_gtin | array | Optional: same product gtins |
keywords | string | Optional: ( "value" or "null) |
new_gtin | string | Optional: ("value" or "null") |
Attribute_id, category_id, product_price, product_lock, keywords will be deleted if have field "delete" with value "true".
Fields store_id, gtin, brand can be changed to null if param = "null".
Field product_price contains object with string fields (country, state,city, postcode, currency, label, price). Field product_lock contains object with boolean fields (gtin_lock, name_lock, brand_lock, scan_count_lock).
Example body
{
"product_id": {
"value": "6"
},
"gtin": {
"value": "00000000005012"
},
"brand": {
"value": "BUTTON TALL BLACK 10"
},
"name": {
"value": "name"
},
"scan_count": {
"value": 76
},
"store_id": {
"value": "null"
},
"attributes": {
"value": ["hg34-5c43-34f34t3t-34t3", "34t-fg323-34t34t3kyuj-34", "g334tfgv34-234gh3g34-3g4"],
"delete": false
},
"categories": {
"value": ["346346-234334c34-324c", "234tc-34ct34-34ct34ctc3", "c3c4c-334ct23ct-324ct34t32"],
"delete": false
},
"product_price": {
"value": {
"country": "usa",
"state": "iowa",
"city": "des moines",
"postcode": "100",
"currency": "d",
"label": "lab",
"price": "531"
},
"delete": false
},
"product_lock": {
"value": {
"gtin_lock": true,
"name_lock": false,
"brand_lock": true,
"scan_count_lock": false
}
},
"product_gtin": {
"value": [
"00000000140744",
"23444423432443"
],
"delete": false
}
}
Example Response
{
"result": "Product updated"
}
Add product
POST /pam-service/api/products
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | headers | Required: |
participant_id | string | Required: |
store_id | string | Optional: |
gtin | string | Optional: |
name | string | Required: |
brand | string | Optional: |
scan_count | string | Required: |
has_price | string | Required: ("0" or "1") |
categories | array | Optional: |
attributes | array | Optional: |
locks | object | Optional: |
new_gtin | bool | Optional: if true creates a new gtin |
Example body
{
"participant_id": "participant13",
"store_id": "store14r22t-5453-345",
"gtin": "13",
"name": "test",
"brand": "brand-test",
"scan_count": "123",
"has_price": "0",
"categories": ["hg-342g24-g523hg42fcwq-3r1mn", "1qe3res-87mnbty-tyhntyety"],
"attributes": ["hqwg-g24-gnhngfncwq-21x23n", "mnrtymr-w23fvty-mjm7ujy"],
"locks": {
"gtin_lock": true,
"name_lock": false,
"brand_lock": true,
"scan_count_lock": false
},
"new_gtin": true
}
Example Response
{
"result": "Product added"
}
Couch Query
POST /pam-service/api/couch
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | headers | Required: |
dbName | string | Required: |
query | object/string | Optional: |
method | string | Optional: (get,insert...) |
Example body
get data from couch
{
"dbName":"docs",
"query":"00000772091930",
"method":"insert"
}
insert data to couch
{
"dbName":"docs",
"query":{"_id":"1234"},
"method":"insert"
}
Export products
POST /pam-service/api/export/products
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | headers | Required: |
participant_id | string (body) | Required: |
Example body
{
"participant_id": "urn:authenticateit:participant:1"
}
Example Response
{
"result": "export_link:4046e27d-c18b-49fc-8f6e-a183b1733e5e"
}
getLink
GET /pam-service/api/export/link
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | headers | Required: |
link_id | string (param) | Required: |
Example Response
{
"result": "https://s3.ap-southeast-2.amazonaws.com/dev-cdn.shping.com/export_urn%3Aauthenticateit%3Aparticipant%3A1_undefined_20210201161256.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVXJOLKOJDXU4TY4N%2F20210201%2Fap-southeast-2%2Fs3%2Faws4_request&X-Amz-Date=20210201T161256Z&X-Amz-Expires=300&X-Amz-Signature=c3207fc52caf7ca69e88890d725b091e3a195b0711aaf6ea8299a767762e6de9&X-Amz-SignedHeaders=host"
}
Import products
POST /pam-service/api/import/products
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | headers | Required: |
parse_string | string (body) | Optional: default:"1" |
participant_id | string (body) | Required: |
data | formData | Required: (data or link) |
link | string (body) | Required: (data or link) link to file |
mapping | object (body) | Required: |
Example body
{
"parse_string":"1",
"participant_id":"participant13",
"link":"http//:............",
"mapping": {
"gtin": "gtin",
"attribute1": "attribute1",
"attribute2": "attribute2",
"attribute3": "attribute3",
"category1": "category1",
"category2": "category2",
"category3": "category3",
"category4": "category4",
"category5": "category5",
"category6": "category6",
"name": "name",
"store_id": "store_id",
"brand": "brand",
"scan_count": "scan_count",
"has_price": "has_price"
}
}
Example Response
{
"status": "in progress", "link": "542-343-68hfh4-f45f-5653f7f-d23-355"
};
Import similar products
POST /pam-service/api/import/products/similar
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | headers | Required: |
data | formData | Required: (data or link) |
link | string (body) | Required: (data or link) link to file |
Example Response
{
"status": "in progress", "link": "542-343-68hfh4-f45f-5653f7f-d23-355"
};
getImportStatus
GET /pam-service/api/import/status
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | headers | Required: |
id | string (param) | Required: id of import process |
Example Response
Success
{
"result": "import completed"
}
Fail
{
"result": "import aborted", "err":"Error message"
}
Update category
PATCH /pam-service/api/categories
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | headers | Required: |
id | string | Required: |
name | string | Optional: |
parents | array | Optional: ('values' or ['null'] ) |
keywords | string | Optional: |
if you want to delete parent_id value should be "null"
Example body
{
"id": "7",
"name": "vegatables",
"parents": ["356-f43f2-f23f-b34gf", "326-2346f-2346-34-34t"]
}
Example Response
{
"result": "Category updated"
}
Update Lock
PATCH /pam-service/api/locks
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | headers | Required: |
product_id | string | Required: ('0' or '1') |
gtin_lock | string | Optional: ('0' or '1') |
name_lock | string | Optional: ('0' or '1') |
brand_lock | string | Optional: ('0' or '1') |
scan_count_lock | string | Optional: ('0' or '1') |
Example body
{
"product_id": "4",
"gtin_lock": "1",
"name_lock": "0",
"brand_lock": "1",
"scan_count_lock": "0"
}
Example Response
{
"result": "Lock updated"
}
Update attribute
PATCH /pam-service/api/attributes
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | headers | Required: |
id | string | Required: |
name | string | Required: |
Example body
{
"id":"20",
"name":"low fat"
}
Example Response
{
"result": "Attribute updated"
}
Delete product
DELETE /pam-service/api/products
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | headers | Required: |
id | string | Required: |
Example body
{
"id":"111"
}
Example Response
{
"result": "Product deleted"
}
Delete retailer
DELETE /pam-service/api/retailers
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | headers | Required: |
participant_id | string | Required: |
Example body
{
"participant_id":"111"
}
Example Response
{
"result": "Attribute deleted"
}
Delete category
DELETE /pam-service/api/categories
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | headers | Required: |
id | string | Required: |
Example body
{
"id":"12"
}
Example Response
{
"result": "Category deleted"
}
Delete attribute
DELETE /pam-service/api/attributes
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | headers | Required: |
id | string | Required: |
Example body
{
"id":"111"
}
Example Response
{
"result": "Attribute deleted"
}
Get SPGs
Get SPGs
GET /pam-service/api/spg
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | header | Required: Session's ticket |
id | params | Required: String, get exact SPG by id |
offset | params | Optional: int, page through spgs, default = 0 |
length | params | Optional: int, set size of spg list, default = 50 |
Example Response
{
"result": [
{
"_id": "urn:authenticateit:spg:fc53d8e3-551c-4d45-aab2-f50d3e04e108",
"_rev": "45-379ec1c0d86c4bcc646277ff24e7af73",
"package_size": "228",
"keywords": [],
"categories": {
"level2": [],
"level1": [
{
"id": "2ec1f439-8d44-449c-81b2-0a552dd4c9b1",
"name": "Fruit & Veg"
}
]
},
"attributes": [
{
"id": "14a38831-6ffb-4fda-939e-f6a695d1a7ab",
"name": "bng"
}
],
"sources": [],
"type": "similar_product_group",
"product_name": "Test product",
"store_id": [
{
"id": "store14r22t-5453-345",
"retailer_id": "urn:authenticateit:participant:179176690975398"
}
],
"images": [],
"package_unit": "each"
}
]
}
Add SPG
Add SPG
POST /pam-service/api/spg
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | header | Required: Session's ticket |
product_name | body | Optional: String |
store_id | body | Optional: Array, [{ id(store id), retailer_id }] |
keywords | body | Optional: Array, [keywords] |
categories | body | Optional: Array, [id] |
attributes | body | Optional: Array, [id] |
images | body | Optional: Array, [url] |
package_unit | body | Optional: String (mg, g, kg, ml, l, each) |
package_size | body | Optional: String |
Example Response
{
"result": "SPG added",
"spg": {
"ok": true,
"id": "urn:authenticateit:spg:31218ada-74e2-47cf-b484-97bfdc99e98a",
"rev": "1-963e5cb256c984d9e923cf2c4efaf21b"
}
}
Update SPG
Update SPG
PATCH /pam-service/api/spg
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | header | Required: Session's ticket |
id | body | Required: String |
product_name | body | One_of: String |
store_id | body | Optional: Array, [{ id(store id), retailer_id }] |
keywords | body | Optional: Array, [keywords] |
categories | body | Optional: Array, [id] |
attributes | body | Optional: Array, [id] |
images | body | Optional: Array, [url] |
package_unit | body | One_of: String (mg, g, kg, ml, l, each) |
package_size | body | One_of: String |
Example Response
{
"result": "SPG updated",
"spg": {
"_id": "urn:authenticateit:spg:fc53d8e3-551c-4d45-aab2-f50d3e04e108",
"_rev": "44-c19ef45a5ed084e13cb06f1cdd0a44fa",
"package_size": "228",
"keywords": [],
"categories": {
"level2": [],
"level1": [
{
"id": "2ec1f439-8d44-449c-81b2-0a552dd4c9b1",
"name": "Fruit & Veg"
}
]
},
"attributes": [
{
"id": "14a38831-6ffb-4fda-939e-f6a695d1a7ab",
"name": "bng"
}
],
"sources": [],
"type": "similar_product_group",
"product_name": "Test product",
"store_id": [
{
"id": "store14r22t-5453-345",
"retailer_id": "urn:authenticateit:participant:179176690975398"
}
],
"images": [],
"package_unit": "each"
}
}
Delete SPG
Delete SPG
DELETE /pam-service/api/spg
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | header | Required: Session's ticket |
id | body | Required: String |
Example Response
{
"result": "SPG deleted",
"spg": {
"ok": true,
"id": "urn:authenticateit:spg:fc53d8e3-551c-4d45-aab2-f50d3e04e108",
"rev": "4-2a41a03c27bd58d87411c45112cc26f6"
}
}
Get Companies
Get Companies
GET /pam-service/api/companies
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | header | Required: Session's ticket |
page_size | queryParams | Required: Integer |
page_number | queryParams | Required: Integer |
name | queryParams | search name String |
country_code | queryParams | search country String |
brand | queryParams | search brand name String |
Example Response
{
"totalItems":9,
"items":[
{
"id": "2",
"name":"Sample Company",
"url":"https://sample.company.com",
"description":"this is sample description",
"image":"https://sample.company.com/logo.png",
},
...
],
"totalPages":1,
"currentPage":0
}
Add Company
Add Company
POST /pam-service/api/companies
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | header | Required: Session's ticket |
name | body | Required: String |
url | body | Optional: String url |
description | body | Optional: String |
image | body | Optional: String url |
Example Response
{
"result": "Company added",
"company": {
"id":"8",
"name": "new Company"
}
}
Update Company
Update Company
PATCH /pam-service/api/companies/{id}
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | header | Required: Session's ticket |
id | urlParam | Required: Integer |
name | body | Required: String |
url | body | Optional: String url |
description | body | Optional: String |
image | body | Optional: String url |
Example Response
{
"result": "Company updated"
}
Get Company
Get Company
GET /pam-service/api/companies/{id}
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | header | Required: Session's ticket |
id | urlParam | Required: Integer |
Example Response
{
"id": "7",
"name": "Sample Company",
"url": "https://www.sample.com",
"description": "This is sample company description",
"image": "https://sample.company.com/logo.png",
"countries":[
{
"id":"3",
"country_code": "uk",
"distributor_name": "sample company for uk",
"distributor_url": "https://www.sample.uk.com",
},
...
]
}
Delete Company
Delete Company
DELETE /pam-service/api/companies/{id}
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | header | Required: Session's ticket |
id | urlParam | Required: Integer |
Example Response
{
"result": "Company deleted"
}
Get Countries of a Company
Get Countries of a Company
GET /pam-service/api/companies/{company_id}/countries
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | header | Required: Session's ticket |
company_id | urlParams | Required: integer |
Example Response
[
{
"id": "2",
"company_id":"9",
"country_code": "uk",
"distributor_name": "sample company for uk",
"distributor_url": "https://www.sample.uk.com",
},
...
]
Add Country
Add Country for a Company
POST /pam-service/api/companies/{company_id}/countries
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | header | Required: Session's ticket |
company_id | urlParam | Required: Integer |
country_code | body | Optional: String |
distributor_name | body | Optional: String |
distributor_url | body | Optional: String url |
Example Response
{
"result": "Country added"
}
Update Country
Update Country
PATCH /pam-service/api/companies/{company_id}/countries/{id}
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | header | Required: Session's ticket |
id | urlParam | Required: Integer |
company_id | urlParam | Required: Integer |
country_code | body | Optional: String |
distributor_name | body | Optional: String |
distributor_url | body | Optional: String url |
Example Response
{
"result": "Country updated"
}
Delete Country
Delete Country for a Company
DELETE /pam-service/api/companies/{company_id}/countries/{id}
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | header | Required: Session's ticket |
id | urlParam | Required: Integer |
company_id | urlParam | Required: Integer |
Example Response
{
"result": "Country deleted"
}
Get Brands for a company country
Get Brands for a company country
GET /pam-service/api/companies/{company_id}/countries/{country_id}
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | header | Required: Session's ticket |
country_id | urlParam | Required: Integer |
company_id | urlParam | Required: Integer |
Example Response
[
{
"id":"3",
"country_id": "7",
"name": "sample brand for sample company",
"url": "https://www.sample.uk.com",
"description": "This is sample brand description",
"image": "https://www.sample.uk.com/logo.png",
},
...
]
Add Company Brand
Add Brand for a company country
POST /pam-service/api/companies/{company_id}/countries/{country_id}
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | header | Required: Session's ticket |
company_id | urlParam | Required: Integer |
country_id | urlParam | Required: Integer |
name | body | Required: String |
url | body | Optional: String url |
description | body | Optional: String |
image | body | Optional: String url |
Example Response
{
"result": "Company Brand added"
}
Update Company Brand
Update Company Brand
PATCH /pam-service/api/companies/{company_id}/countries/{country_id}/{id}
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | header | Required: Session's ticket |
company_id | urlParam | Required: Integer |
country_id | urlParam | Required: Integer |
id | urlParam | Required: Integer |
name | body | Required: String |
url | body | Optional: String url |
description | body | Optional: String |
image | body | Optional: String url |
Example Response
{
"result": "Company Brand updated"
}
Delete Company Brand
Delete Company Brand
DELETE /pam-service/api/companies/{company_id}/countries/{country_id}/{id}
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | header | Required: Session's ticket |
company_id | urlParam | Required: Integer |
country_id | urlParam | Required: Integer |
id | urlParam | Required: Integer |
Example Response
{
"result": "Company Brand deleted"
}
List retailer stores
GET /pam-service/api/v2/stores/
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | header | Required: Session's ticket |
retailer_name | query | Optional: |
store_name | query | Optional: |
address | query | Optional: |
country_name | query | Optional: Array of country names |
state | query | Optional: Array of State code or state name |
postcode | query | Optional: |
zone | query | Optional: |
Example Response
{
"rows": [
{
"id": 4,
"retailer_id": "urn:authenticateit:participant:111111111111147",
"zone_id": 13,
"name": "H",
"store_code": "23241",
"post_code": "2324",
"address": "111",
"rrule": "RRULE:FREQ=WEEKLY;BYDAY=MO",
"latitude": "1.00000000",
"longitude": "1.00000000",
"created_at": "2022-01-11T07:19:03.000Z",
"updated_at": "2022-01-11T07:19:03.000Z",
"deleted_at": null,
"country_code": null,
"state": null,
"zone": null,
"state_name": null,
"country_name": null
}
],
"current_page": 1,
"total_pages": 1,
"total_items": 1
}
List SKU
GET /pam-service/api/v2/stores/:storeId/sku
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | header | Required: Session's ticket |
storeId | params | Required: business location id |
Example Response
{
"result": [
{
"gtin": "07640170370034",
"sku": "amazing-product"
},
{
"gtin": "04324654768588",
"sku": "amazing-product"
},
{
"gtin": "06901007016015",
"sku": "amazing-product"
},
{
"gtin": "06901007016015",
"sku": "amazing-product"
},
{
"gtin": "06901007016015",
"sku": "amazing-product"
},
{
"gtin": "06901007016015",
"sku": "amazing-product"
},
{
"gtin": "04680259422516",
"sku": "amazing-product"
},
{
"gtin": "99420053904584",
"sku": "amazing-product"
},
{
"gtin": "99420053903501",
"sku": "amazing-product"
},
{
"gtin": "04601501089561",
"sku": "amazing-product"
},
{
"gtin": "03660005827650",
"sku": "amazing-product"
},
{
"gtin": "04640020872636",
"sku": "amazing-product"
},
{
"gtin": "04007817314326",
"sku": "amazing-product"
},
{
"gtin": "04680259422516",
"sku": "amazing-product"
},
{
"gtin": "07640170370034",
"sku": "amazing-product"
},
{
"gtin": "08002660000194",
"sku": "amazing-product"
},
{
"gtin": "99420053903716",
"sku": "amazing-product"
},
{
"gtin": "04601185010219",
"sku": "amazing-product"
},
{
"gtin": "04680259396091",
"sku": "amazing-product"
},
{
"gtin": "04324654768588",
"sku": "amazing-product"
},
{
"gtin": "04324654768588",
"sku": "amazing-product"
},
{
"gtin": "04680259396091",
"sku": "amazing-product"
},
{
"gtin": "04740008500824",
"sku": "amazing-product"
},
{
"gtin": "99420053903037",
"sku": "amazing-product"
},
{
"gtin": "04607014242448",
"sku": "amazing-product"
},
{
"gtin": "04627100132132",
"sku": "amazing-product"
},
{
"gtin": "04650001797575",
"sku": "amazing-product"
},
{
"gtin": "04680259422516",
"sku": "amazing-product"
},
{
"gtin": "04680259422516",
"sku": "amazing-product"
},
{
"gtin": "04740008500824",
"sku": "amazing-product"
},
{
"gtin": "08002660000194",
"sku": "amazing-product"
},
{
"gtin": "09501101530003",
"sku": "amazing-product"
},
{
"gtin": "09501101530003",
"sku": "amazing-product"
},
{
"gtin": "03660005827650",
"sku": "amazing-product"
},
{
"gtin": "04603008424005",
"sku": "amazing-product"
},
{
"gtin": "09403145302885",
"sku": "amazing-product"
},
{
"gtin": "04324654768588",
"sku": "amazing-product"
},
{
"gtin": "00000008468567",
"sku": "amazing-product"
},
{
"gtin": "99420053904584",
"sku": "amazing-product"
},
{
"gtin": "04627100132132",
"sku": "amazing-product"
},
{
"gtin": "04680004091011",
"sku": "amazing-product"
},
{
"gtin": "04603566931953",
"sku": "amazing-product"
},
{
"gtin": "04607014242448",
"sku": "amazing-product"
},
{
"gtin": "03660005827650",
"sku": "amazing-product"
},
{
"gtin": "04324654768588",
"sku": "amazing-product"
},
{
"gtin": "04567123900007",
"sku": "amazing-product"
},
{
"gtin": "09501101530003",
"sku": "amazing-product"
},
{
"gtin": "04627084530795",
"sku": "amazing-product"
},
{
"gtin": "99420053903501",
"sku": "amazing-product"
},
{
"gtin": "04680259422516",
"sku": "amazing-product"
},
{
"gtin": "99420053903624",
"sku": "amazing-product"
},
{
"gtin": "07640170370034",
"sku": "amazing-product"
},
{
"gtin": "04007817314326",
"sku": "amazing-product"
},
{
"gtin": "04627084530795",
"sku": "amazing-product"
},
{
"gtin": "04603023066792",
"sku": "amazing-product"
},
{
"gtin": "08001090098238",
"sku": "amazing-product"
},
{
"gtin": "08002660000194",
"sku": "amazing-product"
},
{
"gtin": "05411183033061",
"sku": "amazing-product"
},
{
"gtin": "04680259422516",
"sku": "amazing-product"
},
{
"gtin": "04602078000812",
"sku": "amazing-product"
}
]
}
Import SKU
GET /pam-service/api/v2/stores/:storeId/sku/import
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | header | Required: Session's ticket |
storeId | params | Required: business location id |
data | multipart/form-data | Required: csv import file |
Example Response
{
"result": [
{
"product_id": "09322548256107",
"sku": "2YKL010009",
"location": "urn:authenticateit:location:1487175749640",
"participant_id": "urn:authenticateit:participant:1487175746135"
}
]
}
List retailers
GET /pam-service/api/v2/retailers/
Parameters
Name | Type | Description |
---|---|---|
authenticateit_identity_ticket | header | Required: Session's ticket |
page | query | Optional: default 1 |
limit | query | Optional: default 10 |
name | query | Optional: |
country | query | Optional: |
Example Response
{
"rows": [
{
"rrule": {
"repeat": "WEEKLY",
"week_days": [
1,
5
]
},
"rrule_str": "RRULE:FREQ=WEEKLY;BYDAY=TU,SA",
"participant_id": "urn:authenticateit:participant:000007730166315",
"alias": "retailer-4",
"name": "ECOM orders consignee",
"timezone": "Australia/Tasmania",
"description": null,
"logo": null,
"updated_at": "2022-01-03T00:39:06.000Z",
"created_at": "2022-01-03T00:39:06.000Z",
"deleted_at": null,
"products": 0,
"business_locations": [],
"zones": [],
"receipts": 0,
"recognised": 0,
"business_locations_count": 0,
"zones_count": 0,
"countries": []
},
{
"rrule": {
"repeat": "WEEKLY",
"week_days": [
1,
4
]
},
"rrule_str": "RRULE:FREQ=WEEKLY;BYDAY=TU,FR",
"participant_id": "urn:authenticateit:participant:1",
"alias": "authenticateit-pty-ltd",
"name": "Authenticateit Pty Ltd",
"timezone": "Australia/South",
"description": "This is description",
"logo": "https://dev-cdn.shping.com/2021/12/27/6c814c46-dff3-45cb-b6c3-f29329cc2e7c.png",
"updated_at": "2022-05-20T13:08:36.000Z",
"created_at": null,
"deleted_at": null,
"products": 46679,
"business_locations": [
{
"id": "urn:authenticateit:business_location:9f4956c6-6f95-4cb7-9820-fd1b9fd952e3",
"owner": "urn:authenticateit:participant:1",
"name": "Storage Area",
"sub_site_type": "207",
"country": "643",
"post_code": "353909",
"state": "Krasnodar krai",
"city": "Novorossiysk",
"address": "Elevatornaya, 22",
"longitude": "37778457",
"latitude": "44736821",
"zone_id": null,
"alias": "WOOLOWRTHS-BRIGHTON",
"location_type": "online_store",
"gln": "GLN"
}
],
"zones": [],
"receipts": 0,
"recognised": 0,
"enable_zones": "true",
"business_locations_count": 1,
"zones_count": 0,
"countries": []
},
{
"rrule": {
"repeat": "WEEKLY",
"week_days": [
3
]
},
"rrule_str": "RRULE:FREQ=WEEKLY;BYDAY=TH",
"participant_id": "urn:authenticateit:participant:102065929367721",
"alias": "4t",
"name": "4T",
"timezone": "Australia/Victoria",
"description": "Test Wild Retailer",
"logo": null,
"updated_at": "2022-08-18T02:29:22.000Z",
"created_at": "2022-08-18T02:29:22.000Z",
"deleted_at": null,
"products": 21,
"business_locations": [],
"zones": [],
"receipts": 0,
"recognised": 0,
"business_locations_count": 0,
"zones_count": 0,
"countries": []
},
{
"rrule": null,
"rrule_str": null,
"participant_id": "urn:authenticateit:participant:111111111111111",
"alias": "woolworths",
"name": "Woolworhts",
"timezone": null,
"description": "test",
"logo": "https://cdn.shping.com/2021/3/19/61e014cf-ec5c-4982-9bf9-9c9f58f4e926.png",
"updated_at": null,
"created_at": null,
"deleted_at": null,
"products": 57910,
"business_locations": [],
"zones": [],
"receipts": 170,
"recognised": 70,
"enable_zones": "true",
"business_locations_count": 0,
"zones_count": 0,
"countries": []
},
{
"rrule": {
"repeat": "WEEKLY",
"week_days": [
3
]
},
"rrule_str": "RRULE:FREQ=WEEKLY;BYDAY=TH",
"participant_id": "urn:authenticateit:participant:111111111111115",
"alias": "coles",
"name": "Coles",
"timezone": "Australia/Victoria",
"description": "test",
"logo": "https://dev-cdn.shping.com/2022/1/25/0fedebb2-6542-450d-ab40-dba37f6a59fd.png",
"updated_at": "2022-08-15T00:15:21.000Z",
"created_at": null,
"deleted_at": null,
"products": 58829,
"business_locations": [],
"zones": [],
"receipts": 332,
"recognised": 218,
"business_locations_count": 0,
"zones_count": 0,
"countries": []
},
{
"rrule": {
"repeat": "WEEKLY",
"week_days": [
3
]
},
"rrule_str": "RRULE:FREQ=WEEKLY;BYDAY=TH",
"participant_id": "urn:authenticateit:participant:111111111111128",
"alias": "clinique",
"name": "Import participant Clinique",
"timezone": "Australia/Sydney",
"description": "test",
"logo": null,
"updated_at": "2022-01-28T09:15:39.000Z",
"created_at": "2022-01-28T09:15:39.000Z",
"deleted_at": null,
"products": 0,
"business_locations": [],
"zones": [],
"receipts": 0,
"recognised": 0,
"business_locations_count": 0,
"zones_count": 0,
"countries": []
},
{
"rrule": null,
"rrule_str": null,
"participant_id": "urn:authenticateit:participant:111111111111131",
"alias": "chemistwarehouse",
"name": "Chemist Warehouse",
"timezone": null,
"description": null,
"logo": "https://cdn.shping.com/media/retailers/chemist-logo.png",
"updated_at": null,
"created_at": null,
"deleted_at": null,
"products": 11820,
"business_locations": [],
"zones": [],
"receipts": 1,
"recognised": 0,
"business_locations_count": 0,
"zones_count": 0,
"countries": []
},
{
"rrule": {
"repeat": "YEARLY",
"week_days": [
2
]
},
"rrule_str": "RRULE:FREQ=YEARLY;BYDAY=WE",
"participant_id": "urn:authenticateit:participant:111111111111147",
"alias": "import-participant-home-timber-hardware",
"name": "Import participant Home Timber Hardware",
"timezone": "Australia/Tasmania",
"description": "yes please ",
"logo": null,
"updated_at": "2022-05-20T04:22:39.000Z",
"created_at": "2021-12-27T11:47:22.000Z",
"deleted_at": null,
"products": 0,
"business_locations": [],
"zones": [],
"receipts": 0,
"recognised": 0,
"business_locations_count": 0,
"zones_count": 0,
"countries": []
},
{
"rrule": {
"repeat": "WEEKLY",
"week_days": [
1,
5
]
},
"rrule_str": "RRULE:FREQ=WEEKLY;BYDAY=TU,SA",
"participant_id": "urn:authenticateit:participant:111111111111148",
"alias": "national-pharmacies",
"name": "National Pharmacies",
"timezone": "Australia/Victoria",
"description": null,
"logo": null,
"updated_at": "2022-08-15T00:15:41.000Z",
"created_at": "2022-01-03T00:40:16.000Z",
"deleted_at": null,
"products": 4479,
"business_locations": [],
"zones": [],
"receipts": 0,
"recognised": 0,
"business_locations_count": 0,
"zones_count": 0,
"countries": []
},
{
"rrule": {
"repeat": "WEEKLY",
"week_days": [
3
]
},
"rrule_str": "RRULE:FREQ=WEEKLY;BYDAY=TH",
"participant_id": "urn:authenticateit:participant:266730991497899",
"alias": "test21asqw\"\"1!",
"name": "16 Company",
"timezone": "Australia/Sydney",
"description": "lsflaASd\"\"!\")\"!",
"logo": "https://dev-cdn.shping.com/2022/1/11/775ff3f1-0642-40dc-99f9-0e6c695721b5.jpg",
"updated_at": "2022-01-11T08:34:18.000Z",
"created_at": "2022-01-11T08:34:18.000Z",
"deleted_at": null,
"products": 0,
"business_locations": [
{
"id": "ff5574ee-2bbc-43e4-983e-4e74b3928efa",
"owner": "urn:authenticateit:participant:266730991497899",
"name": "A1",
"sub_site_type": "201",
"country": "643",
"post_code": "353909",
"state": "Krasnodar krai",
"city": "Novorossiysk",
"address": "Elevatornaya, 22",
"longitude": "3.77784576000000029694e+01",
"latitude": "4.47368213999999966290e+01",
"zone_id": "1",
"alias": null,
"location_type": null,
"gln": null
}
],
"zones": [
{
"id": 1,
"name": "Zone 1",
"country_code": "036",
"state_code": "WA",
"description": "This is zone\nyes I am updating",
"created_at": "2021-12-28T12:28:11.000Z",
"updated_at": "2022-01-11T08:38:00.000Z",
"deleted_at": null
}
],
"receipts": 0,
"recognised": 0,
"business_locations_count": 1,
"zones_count": 1,
"countries": [
"AU"
]
}
],
"current_page": 1,
"total_pages": 3,
"total_items": 22
}