Skip to main content

Create/edit product

Method#

/products#

POST https://api.z-api.io/instances/{{instanceId}}/token/{{instanceToken}}/products

Header#

KeyValue
Client-TokenACCOUNT SECURITY TOKEN

Concept#

In this method you will be able to register and update a product in your catalog


Attributes#

Required#

AttributesTypeDescription
currencystringCurrency type
descriptionstringProduct description
imagesstringProduct’s image Url
isHiddenbooleanAttribute to “hide” the product in the catalog
namestringProduct name
priceintegerProduct price
retailerIdstringProduct ID
urlstringZ-APIs Url route

Request Body#

{
"currency": "BRL",
"description": "Uma descricao do produto",
"images": ["https://avatars.githubusercontent.com/u/60630101?s=200&v=4"],
"isHidden": false,
"name": "My first product",
"price": 20,
"retailerId": "002",
"url": "https://z-api.io"
}

Response#

200#

AttributesTypeDescription
idstringProduct ID

Example

{
"id": "4741575945866725"
}

405#

In this case certify that you are sending the correct specification of the method. This means, verify if you sent a POST or GET as specified at the beginning of this topic.

415#

In case you receive 415 error, make sure to add the “Content-Type” of the object you are sending in the request headers, mostly “application/json”


Webhook Response#

Link to webhook response (on receipt)

Webhook


Code#