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 string 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": "+61434428386",
        "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"
}
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 One_of: Object, { stores: [{ id(store id), retailer_id }], action: String }
keywords body One_of: Object, { name: [keyword], action: String }
categories body One_of: Object, { id: [category ids], action: String }
attributes body One_of: Object, { ids: [id], action: String }
images body One_of: Object, { url: [url], action: String }
package_unit body One_of: String (mg, g, kg, ml, l, each)
package_size body One_of: String

actions: [add(default), delete(removes values from input), update(removes old values and insert new)]; delete: true/false(default)

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"
}

results matching ""

    No results matching ""