Skip to main content
POST
/
api
/
v1
/
products
Criar produto
curl --request POST \
  --url https://upay-sistema-api.onrender.com/api/v1/products \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "name": "<string>",
  "price": 2,
  "description": "<string>",
  "currency": "BRL",
  "stockQuantity": 1,
  "stockEnabled": false,
  "isDigital": false,
  "imageUrl": "<string>",
  "status": "ACTIVE"
}
'
{
  "message": "<string>",
  "product": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "description": "<string>",
    "price": 123,
    "currency": "BRL",
    "stockQuantity": 123,
    "stockEnabled": true,
    "isDigital": true,
    "imageUrl": "<string>",
    "status": "ACTIVE",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}

Authorizations

X-API-Key
string
header
required

Chave de API obtida através do endpoint /api/credentials. Também aceita formato Bearer Token: Authorization: Bearer <api_key>

Body

application/json
name
string
required
Required string length: 1 - 255
price
integer
required

Preço em centavos

Required range: x >= 1
description
string | null
Maximum string length: 1000
currency
string
default:BRL
stockQuantity
integer | null

Quantidade em estoque (obrigatório se stockEnabled = true)

Required range: x >= 0
stockEnabled
boolean
default:false
isDigital
boolean
default:false

Indica se o produto é digital (não requer estoque físico)

imageUrl
string<uri> | null
status
enum<string>
default:ACTIVE
Available options:
ACTIVE,
INACTIVE

Response

Produto criado com sucesso

message
string
product
object