Admin api products

Create a product

POST
/api/admin/v2/products

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

name*string
price*number

The default price, used if a store-specific price is not specified.

Range0 <= value
quantity?integerDeprecated
Default0
Range0 <= value
category?stringDeprecated
sku?stringDeprecated
thumbnail?string

URL to thumbnail. If not provided best-effort will be taken to resolve thumbnail url automatically

invalidThumbnail?string

Marks whether thumbnail is a valid image. Can only be specified if 'thumbnail' was also specified and it's value is not empty. If 'thumbnail' was specified then default value for this field is 'false'. Otherwise there is no default value and this field's value depends on whether thumbnail's url was automatically resolved

inventoryItemId?integerDeprecated
externalId?string

Client defined product identifier

taxCode?|

Avalara tax code, available ig avalara integration is enabled

restricted?boolean

Whether the product is a restriction item

storePrices?array<>

An optional list to specify prices per store. IMPORTANT - if specified once, you cannot go back to the default price! You will need to update the prices every time going forward.

barcode*string

Default barcode of default variant for this product

weight*number

Weight of a default variant

Response Body

application/json

application/json

curl -X POST "https://oasis-api.public.sandbox.oasis.aifi.com/api/admin/v2/products" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "price": 0,    "barcode": "string",    "weight": 0  }'
{
  "id": "string",
  "name": "string",
  "price": "string",
  "barcode": "string",
  "category": "string",
  "thumbnail": "string",
  "invalidThumbnail": true,
  "productId": 0,
  "quantity": 0,
  "weight": 0,
  "sku": "string",
  "inventoryItemId": 0,
  "externalId": "string",
  "restricted": true,
  "taxCode": "string",
  "storePrices": [
    {
      "storeId": "string",
      "productId": "string",
      "price": "string",
      "createdAt": "2019-08-24T14:15:22Z"
    }
  ],
  "variants": [
    {
      "id": 0,
      "name": "string",
      "thumbnail": "string",
      "invalidThumbnail": true,
      "externalId": "string",
      "weight": "string",
      "barcodes": [
        {
          "isDefault": true,
          "barcode": "string"
        }
      ],
      "isDefault": true,
      "productId": 0
    }
  ]
}
Empty
{
  "message": "Invalid request body",
  "type": "E_INVALID_BODY",
  "errors": [
    {
      "error": "\"email\" is required",
      "rule": "any.required",
      "field": "\"email\""
    }
  ]
}

How is this guide?

AiFI AI Chat

Beta

Powered by AiFi

Ask docs or API questions to get grounded answers.