Skip to main content
POST
/
products
Create a product
curl --request POST \
  --url https://api.awardee.dev/v1/products \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "gtin": "<string>",
  "description": "<string>",
  "destination": {
    "chatbot": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "page": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "knowledge_base": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "url": "<string>"
  },
  "image_urls": [
    "<string>"
  ]
}
'
{
  "object": "<string>",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "gtin": "<string>",
  "description": "<string>",
  "destination": {
    "chatbot": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "page": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "knowledge_base": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "url": "<string>"
  },
  "total_scans": 0,
  "last_scanned_at": "2023-11-07T05:31:56Z",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "failed_image_urls": [
    "<string>"
  ]
}

Authorizations

Authorization
string
header
required

Send your API key as Authorization: Bearer aw_live_…. Manage keys in the dashboard under Settings → API Keys.

Headers

Idempotency-Key
string

Opaque key that makes this POST safe to retry. Responses are cached for 24h per API key.

Maximum string length: 255

Body

application/json
name
string
required
Minimum string length: 1
gtin
string
description
string
destination
object
status
enum<string>
Available options:
unconfigured,
active,
inactive,
archived
image_urls
string<uri>[]

Response

Product created

object
string
required
Allowed value: "product"
id
string<uuid>
required
name
string
required
gtin
string | null
required
description
string | null
required
status
enum<string>
required
Available options:
unconfigured,
active,
inactive,
archived
destination
object
required
total_scans
integer
required
Required range: -9007199254740991 <= x <= 9007199254740991
last_scanned_at
string<date-time> | null
required
Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
created_at
string<date-time>
required
Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
updated_at
string<date-time>
required
Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
failed_image_urls
string<uri>[]

URLs from the request's image_urls that could not be fetched or attached. Only present when at least one URL failed.