Logo PopinaPopina API

POS partial init check

Check if importing a part from the POS configuration backup is possible

POST/v1/init/partial/check
authorization<token>

To get an API key, please contact us. We'll be happy to help you.

In: header

transaction
mode?string
Default"replace"
Value in"replace" | "merge"
entityGroupsarray<string>
shouldRenewIds?boolean
Defaultfalse

Response Body

application/json

curl -X POST "http://localhost:4001/v1/init/partial/check" \  -H "Content-Type: application/json" \  -d '{    "transaction": {      "id": "9b5bb92d-23ce-4f0f-a901-9f4338a14cfd",      "changes": [        {          "type": "discount",          "data": {            "id": "3425735d-9cdc-468c-bb62-1d97a0868d1a",            "name": "Remise 50%",            "value": 5000,            "index": 0,            "type": "amount",            "targetPrice": "unit"          },          "action": "UPSERT",          "id": "3425735d-9cdc-468c-bb62-1d97a0868d1a"        },        {          "type": "tax",          "data": {            "id": "20ea0043-b205-57b6-8f31-5ec7778cbb3c",            "name": "TVA",            "rate": 2000,            "locationId": "7425735d-9cdc-412a-ab62-1d97a0868d1a"          },          "action": "UPSERT",          "id": "3425735d-9cdc-468c-bb62-1d97a0868d1a"        }      ],      "date": {}    },    "mode": "replace",    "entityGroups": [      "productsPricing"    ],    "shouldRenewIds": false  }'
{
  "warnings": [
    {
      "code": "clean_button_groups",
      "group": "productsPricing"
    }
  ],
  "conflicts": [
    {
      "group": "productsPricing",
      "entity": "pricing"
    }
  ],
  "changes": [
    {
      "type": "discount",
      "data": {
        "id": "3425735d-9cdc-468c-bb62-1d97a0868d1a",
        "name": "Remise 50%",
        "value": 5000,
        "index": 0,
        "type": "amount",
        "targetPrice": "unit"
      },
      "action": "UPSERT",
      "id": "3425735d-9cdc-468c-bb62-1d97a0868d1a"
    },
    {
      "type": "tax",
      "data": {
        "id": "20ea0043-b205-57b6-8f31-5ec7778cbb3c",
        "name": "TVA",
        "rate": 2000,
        "locationId": "7425735d-9cdc-412a-ab62-1d97a0868d1a"
      },
      "action": "UPSERT",
      "id": "3425735d-9cdc-468c-bb62-1d97a0868d1a"
    }
  ]
}