(GET) por ID
API Endpoint
https://api.omnik.io/HUB/v1/variants/{id}
# Here is a curl example
curl --location \
'https://api.omnik.io/HUB/v1/variants/{id}' \
--header 'token: {token}' \
--header 'application_id: {application_id}' \
--header 'seller: {seller-tenant}' \
--header 'Content-Type: application/json'
Result example 2xx:
{
"tenant": "string",
"operator": "string",
"createDate": "1970-01-01T00:00:00.000000",
"lastUpdate": "1970-01-01T00:00:00.000000",
"variantData": {
"id": "string",
"code": "string",
"name": "string"
},
"values": [
{
"code": "string",
"name": "string",
"nickname": "string"
}
]
}
Result example 4xx:
{
"code": 0,
"type": "string",
"message": "string",
"messages": [
{
"code": 0,
"message": "string"
}
]
}
Result example 5xx:
{
"code": 0,
"type": "string",
"message": "string",
"messages": [
{
"code": 0,
"message": "string"
}
]
}
Consulta de Variação pelo ID
Path Parameters
| Campo |
Tipo |
Descrição |
| id |
string |
(required) ID da Variação |
Header Parameters
| Campo |
Tipo |
Descrição |
| token |
string |
(required) seu token de acesso |
| application_id |
string |
(required) ID do seu token de acesso |
| seller |
string |
(required) Tenant ID do Seller (se Operador) |
(GET) por ID
API Endpoint
https://api.omnik.io/HUB/v1/variants/code/{code}
# Here is a curl example
curl --location \
'https://api.omnik.io/HUB/v1/variants/code/{code}' \
--header 'token: {token}' \
--header 'application_id: {application_id}' \
--header 'seller: {seller-tenant}' \
--header 'Content-Type: application/json'
Result example 2xx:
{
"tenant": "string",
"operator": "string",
"createDate": "1970-01-01T00:00:00.000000",
"lastUpdate": "1970-01-01T00:00:00.000000",
"variantData": {
"id": "string",
"code": "string",
"name": "string"
},
"values": [
{
"code": "string",
"name": "string",
"nickname": "string"
}
]
}
Result example 4xx:
{
"code": 0,
"type": "string",
"message": "string",
"messages": [
{
"code": 0,
"message": "string"
}
]
}
Result example 5xx:
{
"code": 0,
"type": "string",
"message": "string",
"messages": [
{
"code": 0,
"message": "string"
}
]
}
Consulta de Variação pelo Código
Path Parameters
| Campo |
Tipo |
Descrição |
| id |
string |
(required) Código da Variação |
Header Parameters
| Campo |
Tipo |
Descrição |
| token |
string |
(required) seu token de acesso |
| application_id |
string |
(required) ID do seu token de acesso |
| seller |
string |
(required) Tenant ID do Seller (se Operador) |
(GET) paginado
API Endpoint
https://api.omnik.io/HUB/v1/variants
# Here is a curl example
curl --location \
'https://api.omnik.io/HUB/v1/variants' \
--header 'token: {token}' \
--header 'application_id: {application_id}' \
--header 'seller: {seller-tenant}' \
--header 'Content-Type: application/json'
Result example 2xx:
{
"total": 0,
"limit": 0,
"offset": 0,
"sort": "string",
"values": [
{
"tenant": "string",
"operator": "string",
"createDate": "1970-01-01T00:00:00.000000",
"lastUpdate": "1970-01-01T00:00:00.000000",
"variantData": {
"id": "string",
"code": "string",
"name": "string"
},
"values": [
{
"code": "string",
"name": "string",
"nickname": "string"
}
]
}
]
}
Result example 4xx:
{
"code": 0,
"type": "string",
"message": "string",
"messages": [
{
"code": 0,
"message": "string"
}
]
}
Result example 5xx:
{
"code": 0,
"type": "string",
"message": "string",
"messages": [
{
"code": 0,
"message": "string"
}
]
}
Consulta de Variações paginada
Header Parameters
| Campo |
Tipo |
Descrição |
| token |
string |
(required) seu token de acesso |
| application_id |
string |
(required) ID do seu token de acesso |
| seller |
string |
(required) Tenant ID do Seller (se Operador) |
Query Parameters
| Campo |
Tipo |
Descrição |
| offset |
integer |
(optional) indica a partir de onde ocorre um aumento |
| limit |
integer |
(optional) indica a quantidade de recursos a serem devolvidos, variando de 10 a no máximo 10 |
| sort |
string |
(optional) indica por qual atributo a consulta deve ser classificada (lastUpdate ou createDate) (Default lastUpdate) |
| last_update |
string($yyyy-MM-dd'T'HH:mm:ss) |
(optional) last update |
(POST) /variants
API Endpoint
https://api.omnik.io/HUB/v1/variants
# Here is a curl example
curl --location \
'https://api.omnik.io/HUB/v1/variants' \
--header 'token: {token}' \
--header 'application_id: {application_id}' \
--header 'seller: {seller-tenant}' \
--header 'Content-Type: application/json' \
--data '{
"name": "string",
"variant": "string"
}'
Result example 2xx:
{
"tenant": "string",
"operator": "string",
"createDate": "1970-01-01T00:00:00.000000",
"lastUpdate": "1970-01-01T00:00:00.000000",
"variantData": {
"id": "string",
"code": "string",
"name": "string"
},
"values": [
{
"code": "string",
"name": "string",
"nickname": "string"
}
]
}
Result example 4xx:
{
"code": 0,
"type": "string",
"message": "string",
"messages": [
{
"code": 0,
"message": "string"
}
]
}
Result example 5xx:
{
"code": 0,
"type": "string",
"message": "string",
"messages": [
{
"code": 0,
"message": "string"
}
]
}
Cadastro de Variação
Header Parameters
| Campo |
Tipo |
Descrição |
| token |
string |
(required) seu token de acesso |
| application_id |
string |
(required) ID do seu token de acesso |
| seller |
string |
(required) Tenant ID do Seller (se Operador) |
Body Parameters
| Campo |
Tipo |
Descrição |
| name |
string |
(required) Nome da Variante |
| variant |
string |
(required) Variante (obrigatoriamente deve ser um dos valores: COLOR, SIZE, VOLTAGE, GLASSSTRENGTH, FLAVOR, POWER, WATTS, CAPACITY, GENDER, PRINT, PACKAGE, FRAGRANCE ou OTHERS) |
(PUT) /variants
API Endpoint
https://api.omnik.io/HUB/v1/variants/{id}
# Here is a curl example
curl --location --request \
PUT 'https://api.omnik.io/HUB/v1/variants/{id}' \
--header 'token: {token}' \
--header 'application_id: {application_id}' \
--header 'seller: {seller-tenant}' \
--header 'Content-Type: application/json' \
--data '{
"value": "string"
}'
Result example 2xx:
{
"tenant": "string",
"operator": "string",
"createDate": "1970-01-01T00:00:00.000000",
"lastUpdate": "1970-01-01T00:00:00.000000",
"variantData": {
"id": "string",
"code": "string",
"name": "string"
},
"values": [
{
"code": "string",
"name": "string",
"nickname": "string"
}
]
}
Result example 4xx:
{
"code": 0,
"type": "string",
"message": "string",
"messages": [
{
"code": 0,
"message": "string"
}
]
}
Result example 5xx:
{
"code": 0,
"type": "string",
"message": "string",
"messages": [
{
"code": 0,
"message": "string"
}
]
}
Alteração de Variação por ID
Path Parameters
| Campo |
Tipo |
Descrição |
| id |
string |
(required) ID da Variação |
Header Parameters
| Campo |
Tipo |
Descrição |
| token |
string |
(required) seu token de acesso |
| application_id |
string |
(required) ID do seu token de acesso |
| seller |
string |
(required) Tenant ID do Seller (se Operador) |
(PUT) /variants/code/{code}
API Endpoint
https://api.omnik.io/HUB/v1/variants/code/{code}
# Here is a curl example
curl --location --request \
PUT 'https://api.omnik.io/HUB/v1/variants/code/{code}' \
--header 'token: {token}' \
--header 'application_id: {application_id}' \
--header 'seller: {seller-tenant}' \
--header 'Content-Type: application/json' \
--data '{
"value": "string"
}'
Result example 2xx:
{
"tenant": "string",
"operator": "string",
"createDate": "1970-01-01T00:00:00.000000",
"lastUpdate": "1970-01-01T00:00:00.000000",
"variantData": {
"id": "string",
"code": "string",
"name": "string"
},
"values": [
{
"code": "string",
"name": "string",
"nickname": "string"
}
]
}
Result example 4xx:
{
"code": 0,
"type": "string",
"message": "string",
"messages": [
{
"code": 0,
"message": "string"
}
]
}
Result example 5xx:
{
"code": 0,
"type": "string",
"message": "string",
"messages": [
{
"code": 0,
"message": "string"
}
]
}
Alteração de Variação por Código
Path Parameters
| Campo |
Tipo |
Descrição |
| code |
string |
(required) Código da Variação |
Header Parameters
| Campo |
Tipo |
Descrição |
| token |
string |
(required) seu token de acesso |
| application_id |
string |
(required) ID do seu token de acesso |
| seller |
string |
(required) Tenant ID do Seller (se Operador) |
(GET) /variants/code/{code}/values
API Endpoint
https://api.omnik.io/HUB/v1/variants/code/{code}/values
# Here is a curl example
curl --location \
'https://api.omnik.io/HUB/v1/variants/code/{code}/values' \
--header 'token: {token}' \
--header 'application_id: {application_id}' \
--header 'seller: {seller-tenant}' \
--header 'Content-Type: application/json'
Result example 2xx:
[
{
"code": "string",
"name": "string",
"nickname": "string"
}
]
Result example 4xx:
{
"code": 0,
"type": "string",
"message": "string",
"messages": [
{
"code": 0,
"message": "string"
}
]
}
Result example 5xx:
{
"code": 0,
"type": "string",
"message": "string",
"messages": [
{
"code": 0,
"message": "string"
}
]
}
Consulta de Valores da Variação pelo Código de Variação
Path Parameters
| Campo |
Tipo |
Descrição |
| code |
string |
(required) Código da Variação |
Header Parameters
| Campo |
Tipo |
Descrição |
| token |
string |
(required) seu token de acesso |
| application_id |
string |
(required) ID do seu token de acesso |
| seller |
string |
(required) Tenant ID do Seller (se Operador) |