ODINMAX

สำหรับนักพัฒนา

API สำหรับร้านค้า

ซิงก์สินค้า สต็อก และออเดอร์ของร้านกับระบบของคุณเอง และรับแจ้งเมื่อมีออเดอร์ใหม่ผ่าน webhook

สร้างคีย์ที่ศูนย์ผู้ขาย เลือกสิทธิ์ที่ต้องใช้ แล้วส่งคีย์ใน header Authorization ทุกคำขอทำงานในนามเจ้าของร้าน ใช้กฎเดียวกับศูนย์ผู้ขาย

ตัวอย่าง

curl -H "Authorization: Bearer odx_..." https://api.odinmax.com/v1/public/listings

Shop

get/v1/shop/meสิทธิ์ shop.read

The calling key: shop, scopes and rate limit

ตัวอย่าง (curl)

curl https://api.odinmax.com/v1/shop/me \
  -H "Authorization: Bearer $ODINMAX_API_KEY"
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/me', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
  },
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "GET",
    "https://api.odinmax.com/v1/shop/me",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/me');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างคำตอบ 200

{
  "shop": {
    "id": "string",
    "shopSlug": "string",
    "shopName": "string",
    "status": "OPEN"
  },
  "key": {
    "id": "string",
    "name": "string",
    "prefix": "odx_live_aB3dE9f",
    "environment": "live",
    "scopes": [
      "shop.read"
    ]
  },
  "rateLimit": {
    "requestsPerMinute": 120
  }
}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
get/v1/shop/profileสิทธิ์ shop.read

Your shop profile and dashboard figures

ตัวอย่าง (curl)

curl https://api.odinmax.com/v1/shop/profile \
  -H "Authorization: Bearer $ODINMAX_API_KEY"
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/profile', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
  },
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "GET",
    "https://api.odinmax.com/v1/shop/profile",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/profile');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างคำตอบ 200

{}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
patch/v1/shop/profileสิทธิ์ shop.write

Change name, bio, avatar or banner

พารามิเตอร์

  • Idempotency-Keyheader · จำเป็น^[A-Za-z0-9_.:-]{1,255}$

ตัวอย่าง (curl)

curl -X PATCH https://api.odinmax.com/v1/shop/profile \
  -H "Authorization: Bearer $ODINMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"shopName":"string","bio":{"th":"string","en":"string"},"avatarId":"string","bannerId":"string"}'
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/profile', {
  method: 'PATCH',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"shopName":"string","bio":{"th":"string","en":"string"},"avatarId":"string","bannerId":"string"}),
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "PATCH",
    "https://api.odinmax.com/v1/shop/profile",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    json={"shopName":"string","bio":{"th":"string","en":"string"},"avatarId":"string","bannerId":"string"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/profile');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PATCH',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => '{"shopName":"string","bio":{"th":"string","en":"string"},"avatarId":"string","bannerId":"string"}',
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างข้อมูลที่ส่ง

{
  "shopName": "string",
  "bio": {
    "th": "string",
    "en": "string"
  },
  "avatarId": "string",
  "bannerId": "string"
}

ตัวอย่างคำตอบ 200

{}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true400 Invalid body (VALIDATION_FAILED), or the Idempotency-Key header is missing or malformed (IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_INVALID)401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)409 The same Idempotency-Key is still being handled (IDEMPOTENCY_IN_PROGRESS), or the change is not possible now (the code says why)422 The Idempotency-Key was used for a different request (IDEMPOTENCY_KEY_REUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
put/v1/shop/business-hoursสิทธิ์ shop.write

Set opening hours (null clears them)

พารามิเตอร์

  • Idempotency-Keyheader · จำเป็น^[A-Za-z0-9_.:-]{1,255}$

ตัวอย่าง (curl)

curl -X PUT https://api.odinmax.com/v1/shop/business-hours \
  -H "Authorization: Bearer $ODINMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"businessHours":"string"}'
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/business-hours', {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"businessHours":"string"}),
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "PUT",
    "https://api.odinmax.com/v1/shop/business-hours",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    json={"businessHours":"string"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/business-hours');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PUT',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => '{"businessHours":"string"}',
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างข้อมูลที่ส่ง

{
  "businessHours": "string"
}

ตัวอย่างคำตอบ 200

{}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true400 Invalid body (VALIDATION_FAILED), or the Idempotency-Key header is missing or malformed (IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_INVALID)401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)409 The same Idempotency-Key is still being handled (IDEMPOTENCY_IN_PROGRESS), or the change is not possible now (the code says why)422 The Idempotency-Key was used for a different request (IDEMPOTENCY_KEY_REUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
post/v1/shop/vacationสิทธิ์ shop.write

Take a break until a date

พารามิเตอร์

  • Idempotency-Keyheader · จำเป็น^[A-Za-z0-9_.:-]{1,255}$

ตัวอย่าง (curl)

curl -X POST https://api.odinmax.com/v1/shop/vacation \
  -H "Authorization: Bearer $ODINMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"until":"2026-10-01T12:00:00.000Z"}'
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/vacation', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"until":"2026-10-01T12:00:00.000Z"}),
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "POST",
    "https://api.odinmax.com/v1/shop/vacation",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    json={"until":"2026-10-01T12:00:00.000Z"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/vacation');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => '{"until":"2026-10-01T12:00:00.000Z"}',
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างข้อมูลที่ส่ง

{
  "until": "2026-10-01T12:00:00.000Z"
}

ตัวอย่างคำตอบ 200

{}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true400 Invalid body (VALIDATION_FAILED), or the Idempotency-Key header is missing or malformed (IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_INVALID)401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)409 The same Idempotency-Key is still being handled (IDEMPOTENCY_IN_PROGRESS), or the change is not possible now (the code says why)422 The Idempotency-Key was used for a different request (IDEMPOTENCY_KEY_REUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
delete/v1/shop/vacationสิทธิ์ shop.write

End the break now

พารามิเตอร์

  • Idempotency-Keyheader · จำเป็น^[A-Za-z0-9_.:-]{1,255}$

ตัวอย่าง (curl)

curl -X DELETE https://api.odinmax.com/v1/shop/vacation \
  -H "Authorization: Bearer $ODINMAX_API_KEY"
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/vacation', {
  method: 'DELETE',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
  },
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "DELETE",
    "https://api.odinmax.com/v1/shop/vacation",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/vacation');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'DELETE',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างคำตอบ 200

{}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true400 Invalid body (VALIDATION_FAILED), or the Idempotency-Key header is missing or malformed (IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_INVALID)401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)409 The same Idempotency-Key is still being handled (IDEMPOTENCY_IN_PROGRESS), or the change is not possible now (the code says why)422 The Idempotency-Key was used for a different request (IDEMPOTENCY_KEY_REUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
get/v1/shop/analyticsสิทธิ์ analytics.read

Views, sales and conversion

พารามิเตอร์

  • daysquery7-90 (30)

ตัวอย่าง (curl)

curl https://api.odinmax.com/v1/shop/analytics \
  -H "Authorization: Bearer $ODINMAX_API_KEY"
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/analytics', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
  },
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "GET",
    "https://api.odinmax.com/v1/shop/analytics",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/analytics');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างคำตอบ 200

{}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)

Chat

get/v1/shop/quick-repliesสิทธิ์ chat.read

Your saved quick replies

ตัวอย่าง (curl)

curl https://api.odinmax.com/v1/shop/quick-replies \
  -H "Authorization: Bearer $ODINMAX_API_KEY"
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/quick-replies', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
  },
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "GET",
    "https://api.odinmax.com/v1/shop/quick-replies",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/quick-replies');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างคำตอบ 200

{}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
post/v1/shop/quick-repliesสิทธิ์ chat.write

Save a quick reply

พารามิเตอร์

  • Idempotency-Keyheader · จำเป็น^[A-Za-z0-9_.:-]{1,255}$

ตัวอย่าง (curl)

curl -X POST https://api.odinmax.com/v1/shop/quick-replies \
  -H "Authorization: Bearer $ODINMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title":"string","body":"string"}'
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/quick-replies', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"title":"string","body":"string"}),
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "POST",
    "https://api.odinmax.com/v1/shop/quick-replies",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    json={"title":"string","body":"string"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/quick-replies');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => '{"title":"string","body":"string"}',
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างข้อมูลที่ส่ง

{
  "title": "string",
  "body": "string"
}

ตัวอย่างคำตอบ 201

{}
201 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true400 Invalid body (VALIDATION_FAILED), or the Idempotency-Key header is missing or malformed (IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_INVALID)401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)409 The same Idempotency-Key is still being handled (IDEMPOTENCY_IN_PROGRESS), or the change is not possible now (the code says why)422 The Idempotency-Key was used for a different request (IDEMPOTENCY_KEY_REUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
delete/v1/shop/quick-replies/{id}สิทธิ์ chat.write

Delete a quick reply

พารามิเตอร์

  • idpath · จำเป็นstring
  • Idempotency-Keyheader · จำเป็น^[A-Za-z0-9_.:-]{1,255}$

ตัวอย่าง (curl)

curl -X DELETE https://api.odinmax.com/v1/shop/quick-replies/aB3dE9 \
  -H "Authorization: Bearer $ODINMAX_API_KEY"
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/quick-replies/aB3dE9', {
  method: 'DELETE',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
  },
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "DELETE",
    "https://api.odinmax.com/v1/shop/quick-replies/aB3dE9",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/quick-replies/aB3dE9');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'DELETE',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างคำตอบ 200

{}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true400 Invalid body (VALIDATION_FAILED), or the Idempotency-Key header is missing or malformed (IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_INVALID)401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)409 The same Idempotency-Key is still being handled (IDEMPOTENCY_IN_PROGRESS), or the change is not possible now (the code says why)422 The Idempotency-Key was used for a different request (IDEMPOTENCY_KEY_REUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
get/v1/shop/chatsสิทธิ์ chat.read

Your chats with the latest message and unread count

ตัวอย่าง (curl)

curl https://api.odinmax.com/v1/shop/chats \
  -H "Authorization: Bearer $ODINMAX_API_KEY"
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/chats', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
  },
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "GET",
    "https://api.odinmax.com/v1/shop/chats",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/chats');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างคำตอบ 200

{}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
get/v1/shop/orders/{code}/chatสิทธิ์ chat.read

An order's chat, older pages with before

พารามิเตอร์

  • codepath · จำเป็น^OM[0-9A-Z]{10}$
  • beforequerystring

ตัวอย่าง (curl)

curl https://api.odinmax.com/v1/shop/orders/OM8K2D4F6H9J/chat \
  -H "Authorization: Bearer $ODINMAX_API_KEY"
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/orders/OM8K2D4F6H9J/chat', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
  },
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "GET",
    "https://api.odinmax.com/v1/shop/orders/OM8K2D4F6H9J/chat",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/orders/OM8K2D4F6H9J/chat');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างคำตอบ 200

{}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
post/v1/shop/orders/{code}/chat/messagesสิทธิ์ chat.write

Send a message in an order chat

พารามิเตอร์

  • codepath · จำเป็น^OM[0-9A-Z]{10}$
  • Idempotency-Keyheader · จำเป็น^[A-Za-z0-9_.:-]{1,255}$

ตัวอย่าง (curl)

curl -X POST https://api.odinmax.com/v1/shop/orders/OM8K2D4F6H9J/chat/messages \
  -H "Authorization: Bearer $ODINMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"clientId":"string","body":"string","attachmentIds":["string"]}'
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/orders/OM8K2D4F6H9J/chat/messages', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"clientId":"string","body":"string","attachmentIds":["string"]}),
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "POST",
    "https://api.odinmax.com/v1/shop/orders/OM8K2D4F6H9J/chat/messages",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    json={"clientId":"string","body":"string","attachmentIds":["string"]},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/orders/OM8K2D4F6H9J/chat/messages');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => '{"clientId":"string","body":"string","attachmentIds":["string"]}',
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างข้อมูลที่ส่ง

{
  "clientId": "string",
  "body": "string",
  "attachmentIds": [
    "string"
  ]
}

ตัวอย่างคำตอบ 201

{}
201 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true400 Invalid body (VALIDATION_FAILED), or the Idempotency-Key header is missing or malformed (IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_INVALID)401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)409 The same Idempotency-Key is still being handled (IDEMPOTENCY_IN_PROGRESS), or the change is not possible now (the code says why)422 The Idempotency-Key was used for a different request (IDEMPOTENCY_KEY_REUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
post/v1/shop/orders/{code}/chat/readสิทธิ์ chat.write

Mark the chat read up to a time

พารามิเตอร์

  • codepath · จำเป็น^OM[0-9A-Z]{10}$
  • Idempotency-Keyheader · จำเป็น^[A-Za-z0-9_.:-]{1,255}$

ตัวอย่าง (curl)

curl -X POST https://api.odinmax.com/v1/shop/orders/OM8K2D4F6H9J/chat/read \
  -H "Authorization: Bearer $ODINMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"at":"2026-10-01T12:00:00.000Z"}'
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/orders/OM8K2D4F6H9J/chat/read', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"at":"2026-10-01T12:00:00.000Z"}),
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "POST",
    "https://api.odinmax.com/v1/shop/orders/OM8K2D4F6H9J/chat/read",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    json={"at":"2026-10-01T12:00:00.000Z"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/orders/OM8K2D4F6H9J/chat/read');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => '{"at":"2026-10-01T12:00:00.000Z"}',
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างข้อมูลที่ส่ง

{
  "at": "2026-10-01T12:00:00.000Z"
}

ตัวอย่างคำตอบ 200

{}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true400 Invalid body (VALIDATION_FAILED), or the Idempotency-Key header is missing or malformed (IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_INVALID)401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)409 The same Idempotency-Key is still being handled (IDEMPOTENCY_IN_PROGRESS), or the change is not possible now (the code says why)422 The Idempotency-Key was used for a different request (IDEMPOTENCY_KEY_REUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
get/v1/shop/inquiries/{id}สิทธิ์ chat.read

A question from a buyer before buying

พารามิเตอร์

  • idpath · จำเป็นstring
  • beforequerystring

ตัวอย่าง (curl)

curl https://api.odinmax.com/v1/shop/inquiries/aB3dE9 \
  -H "Authorization: Bearer $ODINMAX_API_KEY"
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/inquiries/aB3dE9', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
  },
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "GET",
    "https://api.odinmax.com/v1/shop/inquiries/aB3dE9",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/inquiries/aB3dE9');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างคำตอบ 200

{}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
post/v1/shop/inquiries/{id}/messagesสิทธิ์ chat.write

Answer a question

พารามิเตอร์

  • idpath · จำเป็นstring
  • Idempotency-Keyheader · จำเป็น^[A-Za-z0-9_.:-]{1,255}$

ตัวอย่าง (curl)

curl -X POST https://api.odinmax.com/v1/shop/inquiries/aB3dE9/messages \
  -H "Authorization: Bearer $ODINMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"clientId":"string","body":"string","attachmentIds":["string"]}'
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/inquiries/aB3dE9/messages', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"clientId":"string","body":"string","attachmentIds":["string"]}),
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "POST",
    "https://api.odinmax.com/v1/shop/inquiries/aB3dE9/messages",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    json={"clientId":"string","body":"string","attachmentIds":["string"]},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/inquiries/aB3dE9/messages');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => '{"clientId":"string","body":"string","attachmentIds":["string"]}',
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างข้อมูลที่ส่ง

{
  "clientId": "string",
  "body": "string",
  "attachmentIds": [
    "string"
  ]
}

ตัวอย่างคำตอบ 201

{}
201 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true400 Invalid body (VALIDATION_FAILED), or the Idempotency-Key header is missing or malformed (IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_INVALID)401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)409 The same Idempotency-Key is still being handled (IDEMPOTENCY_IN_PROGRESS), or the change is not possible now (the code says why)422 The Idempotency-Key was used for a different request (IDEMPOTENCY_KEY_REUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
post/v1/shop/inquiries/{id}/readสิทธิ์ chat.write

Mark a question read

พารามิเตอร์

  • idpath · จำเป็นstring
  • Idempotency-Keyheader · จำเป็น^[A-Za-z0-9_.:-]{1,255}$

ตัวอย่าง (curl)

curl -X POST https://api.odinmax.com/v1/shop/inquiries/aB3dE9/read \
  -H "Authorization: Bearer $ODINMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"at":"2026-10-01T12:00:00.000Z"}'
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/inquiries/aB3dE9/read', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"at":"2026-10-01T12:00:00.000Z"}),
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "POST",
    "https://api.odinmax.com/v1/shop/inquiries/aB3dE9/read",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    json={"at":"2026-10-01T12:00:00.000Z"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/inquiries/aB3dE9/read');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => '{"at":"2026-10-01T12:00:00.000Z"}',
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างข้อมูลที่ส่ง

{
  "at": "2026-10-01T12:00:00.000Z"
}

ตัวอย่างคำตอบ 200

{}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true400 Invalid body (VALIDATION_FAILED), or the Idempotency-Key header is missing or malformed (IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_INVALID)401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)409 The same Idempotency-Key is still being handled (IDEMPOTENCY_IN_PROGRESS), or the change is not possible now (the code says why)422 The Idempotency-Key was used for a different request (IDEMPOTENCY_KEY_REUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)

Listings

get/v1/shop/listingsสิทธิ์ listings.read

All your listings

ตัวอย่าง (curl)

curl https://api.odinmax.com/v1/shop/listings \
  -H "Authorization: Bearer $ODINMAX_API_KEY"
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/listings', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
  },
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "GET",
    "https://api.odinmax.com/v1/shop/listings",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/listings');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างคำตอบ 200

[
  {
    "shortId": "string",
    "status": "DRAFT",
    "title": {
      "en": "Genshin Impact AR 58",
      "th": "ไอดี Genshin AR 58"
    },
    "type": "TOPUP",
    "deliveryMode": "AUTO",
    "priceTh": {
      "amount": "35500",
      "currency": "THB"
    },
    "priceIntl": {
      "amount": "35500",
      "currency": "THB"
    },
    "price": "string",
    "priceThCustom": false,
    "quantityAvailable": 1,
    "imageUrl": "string",
    "salesCount": 1,
    "moderationNote": "string",
    "updatedAt": "2026-10-01T12:00:00.000Z"
  }
]
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
post/v1/shop/listingsสิทธิ์ listings.write

Create a listing (a draft until you submit it)

พารามิเตอร์

  • Idempotency-Keyheader · จำเป็น^[A-Za-z0-9_.:-]{1,255}$

ตัวอย่าง (curl)

curl -X POST https://api.odinmax.com/v1/shop/listings \
  -H "Authorization: Bearer $ODINMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"categoryFullSlug":"genshin-impact/accounts/all/general","topupMode":"DIRECT","type":"TOPUP","deliveryMode":"AUTO","title":{"en":"Genshin Impact AR 58","th":"ไอดี Genshin AR 58"},"description":{"en":"Genshin Impact AR 58","th":"ไอดี Genshin AR 58"},"price":{"currency":"THB","amount":"string"},"quantity":0,"imageIds":["string"],"attributes":{}}'
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/listings', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"categoryFullSlug":"genshin-impact/accounts/all/general","topupMode":"DIRECT","type":"TOPUP","deliveryMode":"AUTO","title":{"en":"Genshin Impact AR 58","th":"ไอดี Genshin AR 58"},"description":{"en":"Genshin Impact AR 58","th":"ไอดี Genshin AR 58"},"price":{"currency":"THB","amount":"string"},"quantity":0,"imageIds":["string"],"attributes":{}}),
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "POST",
    "https://api.odinmax.com/v1/shop/listings",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    json={"categoryFullSlug":"genshin-impact/accounts/all/general","topupMode":"DIRECT","type":"TOPUP","deliveryMode":"AUTO","title":{"en":"Genshin Impact AR 58","th":"ไอดี Genshin AR 58"},"description":{"en":"Genshin Impact AR 58","th":"ไอดี Genshin AR 58"},"price":{"currency":"THB","amount":"string"},"quantity":0,"imageIds":["string"],"attributes":{}},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/listings');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => '{"categoryFullSlug":"genshin-impact/accounts/all/general","topupMode":"DIRECT","type":"TOPUP","deliveryMode":"AUTO","title":{"en":"Genshin Impact AR 58","th":"ไอดี Genshin AR 58"},"description":{"en":"Genshin Impact AR 58","th":"ไอดี Genshin AR 58"},"price":{"currency":"THB","amount":"string"},"quantity":0,"imageIds":["string"],"attributes":{}}',
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างข้อมูลที่ส่ง

{
  "categoryFullSlug": "genshin-impact/accounts/all/general",
  "topupMode": "DIRECT",
  "type": "TOPUP",
  "deliveryMode": "AUTO",
  "title": {
    "en": "Genshin Impact AR 58",
    "th": "ไอดี Genshin AR 58"
  },
  "description": {
    "en": "Genshin Impact AR 58",
    "th": "ไอดี Genshin AR 58"
  },
  "price": {
    "currency": "THB",
    "amount": "string"
  },
  "quantity": 0,
  "imageIds": [
    "string"
  ],
  "attributes": {}
}

ตัวอย่างคำตอบ 201

{}
201 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true400 Invalid body (VALIDATION_FAILED), or the Idempotency-Key header is missing or malformed (IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_INVALID)401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)409 The same Idempotency-Key is still being handled (IDEMPOTENCY_IN_PROGRESS), or the change is not possible now (the code says why)422 The Idempotency-Key was used for a different request (IDEMPOTENCY_KEY_REUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
get/v1/shop/listings/{shortId}สิทธิ์ listings.read

One listing with everything you can edit

พารามิเตอร์

  • shortIdpath · จำเป็น^[A-Za-z0-9]{4,12}$

ตัวอย่าง (curl)

curl https://api.odinmax.com/v1/shop/listings/aB3dE9 \
  -H "Authorization: Bearer $ODINMAX_API_KEY"
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/listings/aB3dE9', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
  },
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "GET",
    "https://api.odinmax.com/v1/shop/listings/aB3dE9",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/listings/aB3dE9');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างคำตอบ 200

{}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)404 Not a listing of your shop (LISTING_NOT_FOUND)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
put/v1/shop/listings/{shortId}สิทธิ์ listings.write

Replace a listing

พารามิเตอร์

  • shortIdpath · จำเป็น^[A-Za-z0-9]{4,12}$
  • Idempotency-Keyheader · จำเป็น^[A-Za-z0-9_.:-]{1,255}$

ตัวอย่าง (curl)

curl -X PUT https://api.odinmax.com/v1/shop/listings/aB3dE9 \
  -H "Authorization: Bearer $ODINMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"categoryFullSlug":"genshin-impact/accounts/all/general","topupMode":"DIRECT","type":"TOPUP","deliveryMode":"AUTO","title":{"en":"Genshin Impact AR 58","th":"ไอดี Genshin AR 58"},"description":{"en":"Genshin Impact AR 58","th":"ไอดี Genshin AR 58"},"price":{"currency":"THB","amount":"string"},"quantity":0,"imageIds":["string"],"attributes":{}}'
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/listings/aB3dE9', {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"categoryFullSlug":"genshin-impact/accounts/all/general","topupMode":"DIRECT","type":"TOPUP","deliveryMode":"AUTO","title":{"en":"Genshin Impact AR 58","th":"ไอดี Genshin AR 58"},"description":{"en":"Genshin Impact AR 58","th":"ไอดี Genshin AR 58"},"price":{"currency":"THB","amount":"string"},"quantity":0,"imageIds":["string"],"attributes":{}}),
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "PUT",
    "https://api.odinmax.com/v1/shop/listings/aB3dE9",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    json={"categoryFullSlug":"genshin-impact/accounts/all/general","topupMode":"DIRECT","type":"TOPUP","deliveryMode":"AUTO","title":{"en":"Genshin Impact AR 58","th":"ไอดี Genshin AR 58"},"description":{"en":"Genshin Impact AR 58","th":"ไอดี Genshin AR 58"},"price":{"currency":"THB","amount":"string"},"quantity":0,"imageIds":["string"],"attributes":{}},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/listings/aB3dE9');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PUT',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => '{"categoryFullSlug":"genshin-impact/accounts/all/general","topupMode":"DIRECT","type":"TOPUP","deliveryMode":"AUTO","title":{"en":"Genshin Impact AR 58","th":"ไอดี Genshin AR 58"},"description":{"en":"Genshin Impact AR 58","th":"ไอดี Genshin AR 58"},"price":{"currency":"THB","amount":"string"},"quantity":0,"imageIds":["string"],"attributes":{}}',
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างข้อมูลที่ส่ง

{
  "categoryFullSlug": "genshin-impact/accounts/all/general",
  "topupMode": "DIRECT",
  "type": "TOPUP",
  "deliveryMode": "AUTO",
  "title": {
    "en": "Genshin Impact AR 58",
    "th": "ไอดี Genshin AR 58"
  },
  "description": {
    "en": "Genshin Impact AR 58",
    "th": "ไอดี Genshin AR 58"
  },
  "price": {
    "currency": "THB",
    "amount": "string"
  },
  "quantity": 0,
  "imageIds": [
    "string"
  ],
  "attributes": {}
}

ตัวอย่างคำตอบ 200

{}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true400 Invalid body (VALIDATION_FAILED), or the Idempotency-Key header is missing or malformed (IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_INVALID)401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)404 Not a listing of your shop (LISTING_NOT_FOUND)409 The same Idempotency-Key is still being handled (IDEMPOTENCY_IN_PROGRESS), or the change is not possible now (the code says why)422 The Idempotency-Key was used for a different request (IDEMPOTENCY_KEY_REUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
patch/v1/shop/listings/{shortId}สิทธิ์ listings.write

Change price, quantity or pause

พารามิเตอร์

  • shortIdpath · จำเป็น^[A-Za-z0-9]{4,12}$
  • Idempotency-Keyheader · จำเป็น^[A-Za-z0-9_.:-]{1,255}$

ตัวอย่าง (curl)

curl -X PATCH https://api.odinmax.com/v1/shop/listings/aB3dE9 \
  -H "Authorization: Bearer $ODINMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"price":{"currency":"THB","amount":"string"},"priceTh":"string","priceIntl":"string","quantity":0,"paused":false}'
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/listings/aB3dE9', {
  method: 'PATCH',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"price":{"currency":"THB","amount":"string"},"priceTh":"string","priceIntl":"string","quantity":0,"paused":false}),
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "PATCH",
    "https://api.odinmax.com/v1/shop/listings/aB3dE9",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    json={"price":{"currency":"THB","amount":"string"},"priceTh":"string","priceIntl":"string","quantity":0,"paused":False},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/listings/aB3dE9');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PATCH',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => '{"price":{"currency":"THB","amount":"string"},"priceTh":"string","priceIntl":"string","quantity":0,"paused":false}',
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างข้อมูลที่ส่ง

{
  "price": {
    "currency": "THB",
    "amount": "string"
  },
  "priceTh": "string",
  "priceIntl": "string",
  "quantity": 0,
  "paused": false
}

ตัวอย่างคำตอบ 200

{
  "shortId": "string",
  "status": "string",
  "quantityAvailable": 1
}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true400 Invalid body (VALIDATION_FAILED), or the Idempotency-Key header is missing or malformed (IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_INVALID)401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)404 Not a listing of your shop (LISTING_NOT_FOUND)409 The same Idempotency-Key is still being handled (IDEMPOTENCY_IN_PROGRESS), or the change is not possible now (the code says why)422 The Idempotency-Key was used for a different request (IDEMPOTENCY_KEY_REUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
delete/v1/shop/listings/{shortId}สิทธิ์ listings.write

Remove a listing

พารามิเตอร์

  • shortIdpath · จำเป็น^[A-Za-z0-9]{4,12}$
  • Idempotency-Keyheader · จำเป็น^[A-Za-z0-9_.:-]{1,255}$

ตัวอย่าง (curl)

curl -X DELETE https://api.odinmax.com/v1/shop/listings/aB3dE9 \
  -H "Authorization: Bearer $ODINMAX_API_KEY"
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/listings/aB3dE9', {
  method: 'DELETE',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
  },
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "DELETE",
    "https://api.odinmax.com/v1/shop/listings/aB3dE9",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/listings/aB3dE9');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'DELETE',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างคำตอบ 200

{}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true400 Invalid body (VALIDATION_FAILED), or the Idempotency-Key header is missing or malformed (IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_INVALID)401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)409 The same Idempotency-Key is still being handled (IDEMPOTENCY_IN_PROGRESS), or the change is not possible now (the code says why)422 The Idempotency-Key was used for a different request (IDEMPOTENCY_KEY_REUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
get/v1/shop/pricingสิทธิ์ listings.read

Price rules for your shop: currencies, limits and fees

ตัวอย่าง (curl)

curl https://api.odinmax.com/v1/shop/pricing \
  -H "Authorization: Bearer $ODINMAX_API_KEY"
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/pricing', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
  },
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "GET",
    "https://api.odinmax.com/v1/shop/pricing",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/pricing');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างคำตอบ 200

{}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
post/v1/shop/listings/{shortId}/submitสิทธิ์ listings.write

Send a draft for review (or live, when your shop may skip review)

พารามิเตอร์

  • shortIdpath · จำเป็น^[A-Za-z0-9]{4,12}$
  • Idempotency-Keyheader · จำเป็น^[A-Za-z0-9_.:-]{1,255}$

ตัวอย่าง (curl)

curl -X POST https://api.odinmax.com/v1/shop/listings/aB3dE9/submit \
  -H "Authorization: Bearer $ODINMAX_API_KEY"
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/listings/aB3dE9/submit', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
  },
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "POST",
    "https://api.odinmax.com/v1/shop/listings/aB3dE9/submit",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/listings/aB3dE9/submit');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างคำตอบ 200

{}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true400 Invalid body (VALIDATION_FAILED), or the Idempotency-Key header is missing or malformed (IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_INVALID)401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)409 The same Idempotency-Key is still being handled (IDEMPOTENCY_IN_PROGRESS), or the change is not possible now (the code says why)422 The Idempotency-Key was used for a different request (IDEMPOTENCY_KEY_REUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
post/v1/shop/listings/{shortId}/duplicateสิทธิ์ listings.write

Copy a listing as a new draft

พารามิเตอร์

  • shortIdpath · จำเป็น^[A-Za-z0-9]{4,12}$
  • Idempotency-Keyheader · จำเป็น^[A-Za-z0-9_.:-]{1,255}$

ตัวอย่าง (curl)

curl -X POST https://api.odinmax.com/v1/shop/listings/aB3dE9/duplicate \
  -H "Authorization: Bearer $ODINMAX_API_KEY"
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/listings/aB3dE9/duplicate', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
  },
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "POST",
    "https://api.odinmax.com/v1/shop/listings/aB3dE9/duplicate",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/listings/aB3dE9/duplicate');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างคำตอบ 201

{}
201 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true400 Invalid body (VALIDATION_FAILED), or the Idempotency-Key header is missing or malformed (IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_INVALID)401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)409 The same Idempotency-Key is still being handled (IDEMPOTENCY_IN_PROGRESS), or the change is not possible now (the code says why)422 The Idempotency-Key was used for a different request (IDEMPOTENCY_KEY_REUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
post/v1/shop/listings/bulkสิทธิ์ listings.write

Pause, resume or change the price of up to 200 listings

พารามิเตอร์

  • Idempotency-Keyheader · จำเป็น^[A-Za-z0-9_.:-]{1,255}$

ตัวอย่าง (curl)

curl -X POST https://api.odinmax.com/v1/shop/listings/bulk \
  -H "Authorization: Bearer $ODINMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"shortIds":["string"],"action":"pause","percent":-50}'
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/listings/bulk', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"shortIds":["string"],"action":"pause","percent":-50}),
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "POST",
    "https://api.odinmax.com/v1/shop/listings/bulk",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    json={"shortIds":["string"],"action":"pause","percent":-50},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/listings/bulk');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => '{"shortIds":["string"],"action":"pause","percent":-50}',
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างข้อมูลที่ส่ง

{
  "shortIds": [
    "string"
  ],
  "action": "pause",
  "percent": -50
}

ตัวอย่างคำตอบ 200

{
  "done": [
    "string"
  ],
  "failed": [
    {
      "shortId": "string",
      "code": "string"
    }
  ]
}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true400 Invalid body (VALIDATION_FAILED), or the Idempotency-Key header is missing or malformed (IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_INVALID)401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)409 The same Idempotency-Key is still being handled (IDEMPOTENCY_IN_PROGRESS), or the change is not possible now (the code says why)422 The Idempotency-Key was used for a different request (IDEMPOTENCY_KEY_REUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)

Uploads

post/v1/shop/uploadsสิทธิ์ listings.write

Start an upload; send the file to the returned URL, then complete it. The scope follows the purpose: listings.write, orders.fulfill, chat.write or shop.write

พารามิเตอร์

  • Idempotency-Keyheader · จำเป็น^[A-Za-z0-9_.:-]{1,255}$

ตัวอย่าง (curl)

curl -X POST https://api.odinmax.com/v1/shop/uploads \
  -H "Authorization: Bearer $ODINMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"purpose":"LISTING_IMAGE","contentType":"string","size":1,"orderId":"string"}'
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/uploads', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"purpose":"LISTING_IMAGE","contentType":"string","size":1,"orderId":"string"}),
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "POST",
    "https://api.odinmax.com/v1/shop/uploads",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    json={"purpose":"LISTING_IMAGE","contentType":"string","size":1,"orderId":"string"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/uploads');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => '{"purpose":"LISTING_IMAGE","contentType":"string","size":1,"orderId":"string"}',
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างข้อมูลที่ส่ง

{
  "purpose": "LISTING_IMAGE",
  "contentType": "string",
  "size": 1,
  "orderId": "string"
}

ตัวอย่างคำตอบ 201

{}
201 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true400 Invalid body (VALIDATION_FAILED), or the Idempotency-Key header is missing or malformed (IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_INVALID)401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)409 The same Idempotency-Key is still being handled (IDEMPOTENCY_IN_PROGRESS), or the change is not possible now (the code says why)422 The Idempotency-Key was used for a different request (IDEMPOTENCY_KEY_REUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
post/v1/shop/uploads/{id}/completeสิทธิ์ listings.write

Finish an upload after the file was sent

พารามิเตอร์

  • idpath · จำเป็นstring
  • Idempotency-Keyheader · จำเป็น^[A-Za-z0-9_.:-]{1,255}$

ตัวอย่าง (curl)

curl -X POST https://api.odinmax.com/v1/shop/uploads/aB3dE9/complete \
  -H "Authorization: Bearer $ODINMAX_API_KEY"
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/uploads/aB3dE9/complete', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
  },
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "POST",
    "https://api.odinmax.com/v1/shop/uploads/aB3dE9/complete",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/uploads/aB3dE9/complete');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างคำตอบ 200

{}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true400 Invalid body (VALIDATION_FAILED), or the Idempotency-Key header is missing or malformed (IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_INVALID)401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)409 The same Idempotency-Key is still being handled (IDEMPOTENCY_IN_PROGRESS), or the change is not possible now (the code says why)422 The Idempotency-Key was used for a different request (IDEMPOTENCY_KEY_REUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)

Promotions

get/v1/shop/bumpsสิทธิ์ promotions.read

Bumps left today

ตัวอย่าง (curl)

curl https://api.odinmax.com/v1/shop/bumps \
  -H "Authorization: Bearer $ODINMAX_API_KEY"
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/bumps', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
  },
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "GET",
    "https://api.odinmax.com/v1/shop/bumps",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/bumps');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างคำตอบ 200

{}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
post/v1/shop/listings/{shortId}/bumpสิทธิ์ promotions.write

Bump a listing to the top of its list

พารามิเตอร์

  • shortIdpath · จำเป็น^[A-Za-z0-9]{4,12}$
  • Idempotency-Keyheader · จำเป็น^[A-Za-z0-9_.:-]{1,255}$

ตัวอย่าง (curl)

curl -X POST https://api.odinmax.com/v1/shop/listings/aB3dE9/bump \
  -H "Authorization: Bearer $ODINMAX_API_KEY"
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/listings/aB3dE9/bump', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
  },
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "POST",
    "https://api.odinmax.com/v1/shop/listings/aB3dE9/bump",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/listings/aB3dE9/bump');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างคำตอบ 200

{}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true400 Invalid body (VALIDATION_FAILED), or the Idempotency-Key header is missing or malformed (IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_INVALID)401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)409 The same Idempotency-Key is still being handled (IDEMPOTENCY_IN_PROGRESS), or the change is not possible now (the code says why)422 The Idempotency-Key was used for a different request (IDEMPOTENCY_KEY_REUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
post/v1/shop/featuredสิทธิ์ promotions.spend

Book a featured place with shop credit (off unless enabled for your shop); a code is emailed to the key owner

พารามิเตอร์

  • Idempotency-Keyheader · จำเป็น^[A-Za-z0-9_.:-]{1,255}$

ตัวอย่าง (curl)

curl -X POST https://api.odinmax.com/v1/shop/featured \
  -H "Authorization: Bearer $ODINMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"shortId":"string","packageId":"string","currency":"THB"}'
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/featured', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"shortId":"string","packageId":"string","currency":"THB"}),
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "POST",
    "https://api.odinmax.com/v1/shop/featured",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    json={"shortId":"string","packageId":"string","currency":"THB"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/featured');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => '{"shortId":"string","packageId":"string","currency":"THB"}',
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างข้อมูลที่ส่ง

{
  "shortId": "string",
  "packageId": "string",
  "currency": "THB"
}

ตัวอย่างคำตอบ 201

{}
201 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true400 Invalid body (VALIDATION_FAILED), or the Idempotency-Key header is missing or malformed (IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_INVALID)401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)409 The same Idempotency-Key is still being handled (IDEMPOTENCY_IN_PROGRESS), or the change is not possible now (the code says why)422 The Idempotency-Key was used for a different request (IDEMPOTENCY_KEY_REUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
post/v1/shop/featured/{id}/confirmสิทธิ์ promotions.spend

Confirm a booking with the emailed code

พารามิเตอร์

  • idpath · จำเป็นstring
  • Idempotency-Keyheader · จำเป็น^[A-Za-z0-9_.:-]{1,255}$

ตัวอย่าง (curl)

curl -X POST https://api.odinmax.com/v1/shop/featured/aB3dE9/confirm \
  -H "Authorization: Bearer $ODINMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"code":"string"}'
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/featured/aB3dE9/confirm', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"code":"string"}),
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "POST",
    "https://api.odinmax.com/v1/shop/featured/aB3dE9/confirm",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    json={"code":"string"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/featured/aB3dE9/confirm');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => '{"code":"string"}',
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างข้อมูลที่ส่ง

{
  "code": "string"
}

ตัวอย่างคำตอบ 200

{}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true400 Invalid body (VALIDATION_FAILED), or the Idempotency-Key header is missing or malformed (IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_INVALID)401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)409 The same Idempotency-Key is still being handled (IDEMPOTENCY_IN_PROGRESS), or the change is not possible now (the code says why)422 The Idempotency-Key was used for a different request (IDEMPOTENCY_KEY_REUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)

Stock

get/v1/shop/stockสิทธิ์ stock.read

Stock of every automatic-delivery listing (counts, never the codes)

ตัวอย่าง (curl)

curl https://api.odinmax.com/v1/shop/stock \
  -H "Authorization: Bearer $ODINMAX_API_KEY"
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/stock', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
  },
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "GET",
    "https://api.odinmax.com/v1/shop/stock",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/stock');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างคำตอบ 200

{}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
get/v1/shop/listings/{shortId}/stockสิทธิ์ stock.read

Units of one listing with masked hints

พารามิเตอร์

  • shortIdpath · จำเป็น^[A-Za-z0-9]{4,12}$

ตัวอย่าง (curl)

curl https://api.odinmax.com/v1/shop/listings/aB3dE9/stock \
  -H "Authorization: Bearer $ODINMAX_API_KEY"
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/listings/aB3dE9/stock', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
  },
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "GET",
    "https://api.odinmax.com/v1/shop/listings/aB3dE9/stock",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/listings/aB3dE9/stock');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างคำตอบ 200

{}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)404 Not a listing of your shop (LISTING_NOT_FOUND)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
post/v1/shop/listings/{shortId}/stockสิทธิ์ stock.write

Add codes or accounts (up to 200 per call)

พารามิเตอร์

  • shortIdpath · จำเป็น^[A-Za-z0-9]{4,12}$
  • Idempotency-Keyheader · จำเป็น^[A-Za-z0-9_.:-]{1,255}$

ตัวอย่าง (curl)

curl -X POST https://api.odinmax.com/v1/shop/listings/aB3dE9/stock \
  -H "Authorization: Bearer $ODINMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"items":["string"]}'
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/listings/aB3dE9/stock', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"items":["string"]}),
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "POST",
    "https://api.odinmax.com/v1/shop/listings/aB3dE9/stock",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    json={"items":["string"]},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/listings/aB3dE9/stock');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => '{"items":["string"]}',
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างข้อมูลที่ส่ง

{
  "items": [
    "string"
  ]
}

ตัวอย่างคำตอบ 201

{}
201 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true400 Invalid body (VALIDATION_FAILED), or the Idempotency-Key header is missing or malformed (IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_INVALID)401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)404 Not a listing of your shop (LISTING_NOT_FOUND)409 The same Idempotency-Key is still being handled (IDEMPOTENCY_IN_PROGRESS), or the change is not possible now (the code says why)422 The Idempotency-Key was used for a different request (IDEMPOTENCY_KEY_REUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
delete/v1/shop/listings/{shortId}/stock/{id}สิทธิ์ stock.write

Take back one unsold unit

พารามิเตอร์

  • shortIdpath · จำเป็น^[A-Za-z0-9]{4,12}$
  • idpath · จำเป็นstring
  • Idempotency-Keyheader · จำเป็น^[A-Za-z0-9_.:-]{1,255}$

ตัวอย่าง (curl)

curl -X DELETE https://api.odinmax.com/v1/shop/listings/aB3dE9/stock/aB3dE9 \
  -H "Authorization: Bearer $ODINMAX_API_KEY"
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/listings/aB3dE9/stock/aB3dE9', {
  method: 'DELETE',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
  },
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "DELETE",
    "https://api.odinmax.com/v1/shop/listings/aB3dE9/stock/aB3dE9",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/listings/aB3dE9/stock/aB3dE9');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'DELETE',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างคำตอบ 200

{}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true400 Invalid body (VALIDATION_FAILED), or the Idempotency-Key header is missing or malformed (IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_INVALID)401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)409 The same Idempotency-Key is still being handled (IDEMPOTENCY_IN_PROGRESS), or the change is not possible now (the code says why)422 The Idempotency-Key was used for a different request (IDEMPOTENCY_KEY_REUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)

Orders

get/v1/shop/ordersสิทธิ์ orders.read

Orders, newest first, in pages

พารามิเตอร์

  • statusqueryPAID | DELIVERED | COMPLETED | DISPUTED | REFUNDED
  • cursorquery^OM[0-9A-Z]{10}$
  • limitquery1-100 (50)

ตัวอย่าง (curl)

curl https://api.odinmax.com/v1/shop/orders \
  -H "Authorization: Bearer $ODINMAX_API_KEY"
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/orders', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
  },
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "GET",
    "https://api.odinmax.com/v1/shop/orders",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/orders');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างคำตอบ 200

{
  "items": [
    {
      "code": "string",
      "status": "string",
      "subtotal": {
        "amount": "35500",
        "currency": "THB"
      },
      "commission": {
        "amount": "35500",
        "currency": "THB"
      },
      "createdAt": "2026-10-01T12:00:00.000Z",
      "paidAt": "2026-10-01T12:00:00.000Z",
      "deliveredAt": "2026-10-01T12:00:00.000Z",
      "completedAt": "2026-10-01T12:00:00.000Z",
      "autoConfirmAt": "2026-10-01T12:00:00.000Z",
      "items": [
        {
          "shortId": "string",
          "title": {
            "en": "Genshin Impact AR 58",
            "th": "ไอดี Genshin AR 58"
          },
          "quantity": 1,
          "unitPrice": {
            "amount": null,
            "currency": null
          }
        }
      ]
    }
  ],
  "nextCursor": "string"
}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
get/v1/shop/orders/{code}สิทธิ์ orders.read

One order

พารามิเตอร์

  • codepath · จำเป็น^OM[0-9A-Z]{10}$

ตัวอย่าง (curl)

curl https://api.odinmax.com/v1/shop/orders/OM8K2D4F6H9J \
  -H "Authorization: Bearer $ODINMAX_API_KEY"
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/orders/OM8K2D4F6H9J', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
  },
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "GET",
    "https://api.odinmax.com/v1/shop/orders/OM8K2D4F6H9J",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/orders/OM8K2D4F6H9J');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างคำตอบ 200

{
  "code": "string",
  "status": "string",
  "subtotal": {
    "amount": "35500",
    "currency": "THB"
  },
  "commission": {
    "amount": "35500",
    "currency": "THB"
  },
  "createdAt": "2026-10-01T12:00:00.000Z",
  "paidAt": "2026-10-01T12:00:00.000Z",
  "deliveredAt": "2026-10-01T12:00:00.000Z",
  "completedAt": "2026-10-01T12:00:00.000Z",
  "autoConfirmAt": "2026-10-01T12:00:00.000Z",
  "items": [
    {
      "shortId": "string",
      "title": {
        "en": "Genshin Impact AR 58",
        "th": "ไอดี Genshin AR 58"
      },
      "quantity": 1,
      "unitPrice": {
        "amount": "35500",
        "currency": "THB"
      }
    }
  ]
}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)404 Not an order of your shop (ORDER_NOT_FOUND)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
post/v1/shop/orders/{code}/deliverสิทธิ์ orders.fulfill

Mark a manual order delivered, with evidence uploads

พารามิเตอร์

  • codepath · จำเป็น^OM[0-9A-Z]{10}$
  • Idempotency-Keyheader · จำเป็น^[A-Za-z0-9_.:-]{1,255}$

ตัวอย่าง (curl)

curl -X POST https://api.odinmax.com/v1/shop/orders/OM8K2D4F6H9J/deliver \
  -H "Authorization: Bearer $ODINMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"evidenceIds":["string"]}'
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/orders/OM8K2D4F6H9J/deliver', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"evidenceIds":["string"]}),
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "POST",
    "https://api.odinmax.com/v1/shop/orders/OM8K2D4F6H9J/deliver",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    json={"evidenceIds":["string"]},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/orders/OM8K2D4F6H9J/deliver');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => '{"evidenceIds":["string"]}',
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างข้อมูลที่ส่ง

{
  "evidenceIds": [
    "string"
  ]
}

ตัวอย่างคำตอบ 200

{}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true400 Invalid body (VALIDATION_FAILED), or the Idempotency-Key header is missing or malformed (IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_INVALID)401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)404 Not an order of your shop (ORDER_NOT_FOUND)409 The same Idempotency-Key is still being handled (IDEMPOTENCY_IN_PROGRESS), or the change is not possible now (the code says why)422 The Idempotency-Key was used for a different request (IDEMPOTENCY_KEY_REUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
post/v1/shop/orders/{code}/cancelสิทธิ์ orders.fulfill

Cancel a paid order you cannot fulfil (the buyer is refunded)

พารามิเตอร์

  • codepath · จำเป็น^OM[0-9A-Z]{10}$
  • Idempotency-Keyheader · จำเป็น^[A-Za-z0-9_.:-]{1,255}$

ตัวอย่าง (curl)

curl -X POST https://api.odinmax.com/v1/shop/orders/OM8K2D4F6H9J/cancel \
  -H "Authorization: Bearer $ODINMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"reason":"string"}'
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/orders/OM8K2D4F6H9J/cancel', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"reason":"string"}),
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "POST",
    "https://api.odinmax.com/v1/shop/orders/OM8K2D4F6H9J/cancel",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    json={"reason":"string"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/orders/OM8K2D4F6H9J/cancel');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => '{"reason":"string"}',
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างข้อมูลที่ส่ง

{
  "reason": "string"
}

ตัวอย่างคำตอบ 200

{}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true400 Invalid body (VALIDATION_FAILED), or the Idempotency-Key header is missing or malformed (IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_INVALID)401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)409 The same Idempotency-Key is still being handled (IDEMPOTENCY_IN_PROGRESS), or the change is not possible now (the code says why)422 The Idempotency-Key was used for a different request (IDEMPOTENCY_KEY_REUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
post/v1/shop/orders/{code}/cancel-request/answerสิทธิ์ orders.fulfill

Answer the buyer's cancel request

พารามิเตอร์

  • codepath · จำเป็น^OM[0-9A-Z]{10}$
  • Idempotency-Keyheader · จำเป็น^[A-Za-z0-9_.:-]{1,255}$

ตัวอย่าง (curl)

curl -X POST https://api.odinmax.com/v1/shop/orders/OM8K2D4F6H9J/cancel-request/answer \
  -H "Authorization: Bearer $ODINMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"accept":false,"answer":"string"}'
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/orders/OM8K2D4F6H9J/cancel-request/answer', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"accept":false,"answer":"string"}),
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "POST",
    "https://api.odinmax.com/v1/shop/orders/OM8K2D4F6H9J/cancel-request/answer",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    json={"accept":False,"answer":"string"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/orders/OM8K2D4F6H9J/cancel-request/answer');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => '{"accept":false,"answer":"string"}',
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างข้อมูลที่ส่ง

{
  "accept": false,
  "answer": "string"
}

ตัวอย่างคำตอบ 200

{}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true400 Invalid body (VALIDATION_FAILED), or the Idempotency-Key header is missing or malformed (IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_INVALID)401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)409 The same Idempotency-Key is still being handled (IDEMPOTENCY_IN_PROGRESS), or the change is not possible now (the code says why)422 The Idempotency-Key was used for a different request (IDEMPOTENCY_KEY_REUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)

Reviews

get/v1/shop/reviewsสิทธิ์ reviews.read

Reviews of your shop

พารามิเตอร์

  • filterqueryall | unanswered | low | appealed
  • pagequery1-10000 (1)
  • pageSizequery1-100 (20)

ตัวอย่าง (curl)

curl https://api.odinmax.com/v1/shop/reviews \
  -H "Authorization: Bearer $ODINMAX_API_KEY"
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/reviews', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
  },
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "GET",
    "https://api.odinmax.com/v1/shop/reviews",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/reviews');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างคำตอบ 200

{}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
post/v1/shop/reviews/{id}/replyสิทธิ์ reviews.write

Reply to a review (once)

พารามิเตอร์

  • idpath · จำเป็นstring
  • Idempotency-Keyheader · จำเป็น^[A-Za-z0-9_.:-]{1,255}$

ตัวอย่าง (curl)

curl -X POST https://api.odinmax.com/v1/shop/reviews/aB3dE9/reply \
  -H "Authorization: Bearer $ODINMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"body":"string"}'
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/reviews/aB3dE9/reply', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"body":"string"}),
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "POST",
    "https://api.odinmax.com/v1/shop/reviews/aB3dE9/reply",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    json={"body":"string"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/reviews/aB3dE9/reply');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => '{"body":"string"}',
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างข้อมูลที่ส่ง

{
  "body": "string"
}

ตัวอย่างคำตอบ 201

{}
201 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true400 Invalid body (VALIDATION_FAILED), or the Idempotency-Key header is missing or malformed (IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_INVALID)401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)409 The same Idempotency-Key is still being handled (IDEMPOTENCY_IN_PROGRESS), or the change is not possible now (the code says why)422 The Idempotency-Key was used for a different request (IDEMPOTENCY_KEY_REUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)

Disputes

get/v1/shop/disputesสิทธิ์ disputes.read

Open and recent disputes and warranty claims

ตัวอย่าง (curl)

curl https://api.odinmax.com/v1/shop/disputes \
  -H "Authorization: Bearer $ODINMAX_API_KEY"
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/disputes', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
  },
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "GET",
    "https://api.odinmax.com/v1/shop/disputes",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/disputes');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างคำตอบ 200

{}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
get/v1/shop/orders/{code}/disputeสิทธิ์ disputes.read

The dispute on one order

พารามิเตอร์

  • codepath · จำเป็น^OM[0-9A-Z]{10}$

ตัวอย่าง (curl)

curl https://api.odinmax.com/v1/shop/orders/OM8K2D4F6H9J/dispute \
  -H "Authorization: Bearer $ODINMAX_API_KEY"
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/orders/OM8K2D4F6H9J/dispute', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
  },
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "GET",
    "https://api.odinmax.com/v1/shop/orders/OM8K2D4F6H9J/dispute",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/orders/OM8K2D4F6H9J/dispute');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างคำตอบ 200

{}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)404 Not an order of your shop (ORDER_NOT_FOUND)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
post/v1/shop/orders/{code}/dispute/appealสิทธิ์ disputes.write

Appeal a ruling once, within the appeal window

พารามิเตอร์

  • codepath · จำเป็น^OM[0-9A-Z]{10}$
  • Idempotency-Keyheader · จำเป็น^[A-Za-z0-9_.:-]{1,255}$

ตัวอย่าง (curl)

curl -X POST https://api.odinmax.com/v1/shop/orders/OM8K2D4F6H9J/dispute/appeal \
  -H "Authorization: Bearer $ODINMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"reason":"string"}'
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/orders/OM8K2D4F6H9J/dispute/appeal', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"reason":"string"}),
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "POST",
    "https://api.odinmax.com/v1/shop/orders/OM8K2D4F6H9J/dispute/appeal",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    json={"reason":"string"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/orders/OM8K2D4F6H9J/dispute/appeal');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => '{"reason":"string"}',
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างข้อมูลที่ส่ง

{
  "reason": "string"
}

ตัวอย่างคำตอบ 201

{}
201 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true400 Invalid body (VALIDATION_FAILED), or the Idempotency-Key header is missing or malformed (IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_INVALID)401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)409 The same Idempotency-Key is still being handled (IDEMPOTENCY_IN_PROGRESS), or the change is not possible now (the code says why)422 The Idempotency-Key was used for a different request (IDEMPOTENCY_KEY_REUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
post/v1/shop/orders/{code}/warranty-claims/{id}/resolveสิทธิ์ disputes.write

Answer a warranty claim: replace, refund or ask for help

พารามิเตอร์

  • codepath · จำเป็น^OM[0-9A-Z]{10}$
  • idpath · จำเป็นstring
  • Idempotency-Keyheader · จำเป็น^[A-Za-z0-9_.:-]{1,255}$

ตัวอย่าง (curl)

curl -X POST https://api.odinmax.com/v1/shop/orders/OM8K2D4F6H9J/warranty-claims/aB3dE9/resolve \
  -H "Authorization: Bearer $ODINMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"action":"REPLACE","note":"string"}'
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/orders/OM8K2D4F6H9J/warranty-claims/aB3dE9/resolve', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"action":"REPLACE","note":"string"}),
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "POST",
    "https://api.odinmax.com/v1/shop/orders/OM8K2D4F6H9J/warranty-claims/aB3dE9/resolve",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    json={"action":"REPLACE","note":"string"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/orders/OM8K2D4F6H9J/warranty-claims/aB3dE9/resolve');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => '{"action":"REPLACE","note":"string"}',
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างข้อมูลที่ส่ง

{
  "action": "REPLACE",
  "note": "string"
}

ตัวอย่างคำตอบ 200

{}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true400 Invalid body (VALIDATION_FAILED), or the Idempotency-Key header is missing or malformed (IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_INVALID)401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)409 The same Idempotency-Key is still being handled (IDEMPOTENCY_IN_PROGRESS), or the change is not possible now (the code says why)422 The Idempotency-Key was used for a different request (IDEMPOTENCY_KEY_REUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)

Finance

get/v1/shop/balancesสิทธิ์ finance.read

Shop credit: available, held and pending, per currency

ตัวอย่าง (curl)

curl https://api.odinmax.com/v1/shop/balances \
  -H "Authorization: Bearer $ODINMAX_API_KEY"
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/balances', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
  },
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "GET",
    "https://api.odinmax.com/v1/shop/balances",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/balances');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างคำตอบ 200

{}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
get/v1/shop/statementสิทธิ์ finance.read

Every credit movement, newest first

พารามิเตอร์

  • currencyqueryTHB | USD
  • pagequery1-1000 (1)

ตัวอย่าง (curl)

curl https://api.odinmax.com/v1/shop/statement \
  -H "Authorization: Bearer $ODINMAX_API_KEY"
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/statement', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
  },
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "GET",
    "https://api.odinmax.com/v1/shop/statement",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/statement');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างคำตอบ 200

{}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
post/v1/shop/withdrawalsสิทธิ์ finance.withdraw

Ask for a withdrawal (off unless enabled for your shop). Nothing moves until the shop owner confirms it in the Seller Center with an emailed code

พารามิเตอร์

  • Idempotency-Keyheader · จำเป็น^[A-Za-z0-9_.:-]{1,255}$

ตัวอย่าง (curl)

curl -X POST https://api.odinmax.com/v1/shop/withdrawals \
  -H "Authorization: Bearer $ODINMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"currency":"THB","amount":"string","payoutAccountId":"string"}'
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/withdrawals', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"currency":"THB","amount":"string","payoutAccountId":"string"}),
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "POST",
    "https://api.odinmax.com/v1/shop/withdrawals",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    json={"currency":"THB","amount":"string","payoutAccountId":"string"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/withdrawals');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => '{"currency":"THB","amount":"string","payoutAccountId":"string"}',
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างข้อมูลที่ส่ง

{
  "currency": "THB",
  "amount": "string",
  "payoutAccountId": "string"
}

ตัวอย่างคำตอบ 201

{
  "id": "string",
  "status": "PENDING_OWNER",
  "currency": "THB",
  "amount": "string",
  "payoutAccountId": "string",
  "withdrawalId": "string",
  "expiresAt": "2026-10-01T12:00:00.000Z",
  "createdAt": "2026-10-01T12:00:00.000Z"
}
201 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true400 Invalid body (VALIDATION_FAILED), or the Idempotency-Key header is missing or malformed (IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_INVALID)401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)409 The same Idempotency-Key is still being handled (IDEMPOTENCY_IN_PROGRESS), or the change is not possible now (the code says why)422 The Idempotency-Key was used for a different request (IDEMPOTENCY_KEY_REUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
get/v1/shop/withdrawalsสิทธิ์ finance.read

Withdrawal requests made through the API

ตัวอย่าง (curl)

curl https://api.odinmax.com/v1/shop/withdrawals \
  -H "Authorization: Bearer $ODINMAX_API_KEY"
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/withdrawals', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
  },
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "GET",
    "https://api.odinmax.com/v1/shop/withdrawals",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/withdrawals');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างคำตอบ 200

[
  {
    "id": "string",
    "status": "PENDING_OWNER",
    "currency": "THB",
    "amount": "string",
    "payoutAccountId": "string",
    "withdrawalId": "string",
    "expiresAt": "2026-10-01T12:00:00.000Z",
    "createdAt": "2026-10-01T12:00:00.000Z"
  }
]
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)

Team

get/v1/shop/teamสิทธิ์ team.read

Names and roles of your team (no emails)

ตัวอย่าง (curl)

curl https://api.odinmax.com/v1/shop/team \
  -H "Authorization: Bearer $ODINMAX_API_KEY"
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/team', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
  },
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "GET",
    "https://api.odinmax.com/v1/shop/team",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/team');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างคำตอบ 200

{}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)

Webhooks

get/v1/shop/webhooksสิทธิ์ webhooks.manage

Your webhooks

ตัวอย่าง (curl)

curl https://api.odinmax.com/v1/shop/webhooks \
  -H "Authorization: Bearer $ODINMAX_API_KEY"
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/webhooks', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
  },
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "GET",
    "https://api.odinmax.com/v1/shop/webhooks",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/webhooks');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างคำตอบ 200

[
  {
    "id": "string",
    "url": "string",
    "events": [
      "string"
    ],
    "isActive": false,
    "disabledReason": "FAILURES",
    "lastDeliveryAt": "2026-10-01T12:00:00.000Z",
    "lastStatus": 1
  }
]
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
post/v1/shop/webhooksสิทธิ์ webhooks.manage

Add a webhook; the signing secret is returned once

พารามิเตอร์

  • Idempotency-Keyheader · จำเป็น^[A-Za-z0-9_.:-]{1,255}$

ตัวอย่าง (curl)

curl -X POST https://api.odinmax.com/v1/shop/webhooks \
  -H "Authorization: Bearer $ODINMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://hooks.your-shop.example/odinmax","events":["order.created"]}'
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/webhooks', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"url":"https://hooks.your-shop.example/odinmax","events":["order.created"]}),
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "POST",
    "https://api.odinmax.com/v1/shop/webhooks",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    json={"url":"https://hooks.your-shop.example/odinmax","events":["order.created"]},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/webhooks');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => '{"url":"https://hooks.your-shop.example/odinmax","events":["order.created"]}',
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างข้อมูลที่ส่ง

{
  "url": "https://hooks.your-shop.example/odinmax",
  "events": [
    "order.created"
  ]
}

ตัวอย่างคำตอบ 201

{
  "id": "string",
  "secret": "whsec_..."
}
201 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true400 Invalid body (VALIDATION_FAILED), or the Idempotency-Key header is missing or malformed (IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_INVALID)401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)409 The same Idempotency-Key is still being handled (IDEMPOTENCY_IN_PROGRESS), or the change is not possible now (the code says why)422 The Idempotency-Key was used for a different request (IDEMPOTENCY_KEY_REUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
patch/v1/shop/webhooks/{id}สิทธิ์ webhooks.manage

Change the address or the events

พารามิเตอร์

  • idpath · จำเป็นstring
  • Idempotency-Keyheader · จำเป็น^[A-Za-z0-9_.:-]{1,255}$

ตัวอย่าง (curl)

curl -X PATCH https://api.odinmax.com/v1/shop/webhooks/aB3dE9 \
  -H "Authorization: Bearer $ODINMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://hooks.your-shop.example/odinmax","events":["order.created"]}'
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/webhooks/aB3dE9', {
  method: 'PATCH',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"url":"https://hooks.your-shop.example/odinmax","events":["order.created"]}),
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "PATCH",
    "https://api.odinmax.com/v1/shop/webhooks/aB3dE9",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    json={"url":"https://hooks.your-shop.example/odinmax","events":["order.created"]},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/webhooks/aB3dE9');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PATCH',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => '{"url":"https://hooks.your-shop.example/odinmax","events":["order.created"]}',
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างข้อมูลที่ส่ง

{
  "url": "https://hooks.your-shop.example/odinmax",
  "events": [
    "order.created"
  ]
}

ตัวอย่างคำตอบ 200

{
  "id": "string",
  "url": "string",
  "events": [
    "string"
  ],
  "isActive": false,
  "disabledReason": "FAILURES",
  "lastDeliveryAt": "2026-10-01T12:00:00.000Z",
  "lastStatus": 1
}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true400 Invalid body (VALIDATION_FAILED), or the Idempotency-Key header is missing or malformed (IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_INVALID)401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)409 The same Idempotency-Key is still being handled (IDEMPOTENCY_IN_PROGRESS), or the change is not possible now (the code says why)422 The Idempotency-Key was used for a different request (IDEMPOTENCY_KEY_REUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
delete/v1/shop/webhooks/{id}สิทธิ์ webhooks.manage

Delete a webhook

พารามิเตอร์

  • idpath · จำเป็นstring
  • Idempotency-Keyheader · จำเป็น^[A-Za-z0-9_.:-]{1,255}$

ตัวอย่าง (curl)

curl -X DELETE https://api.odinmax.com/v1/shop/webhooks/aB3dE9 \
  -H "Authorization: Bearer $ODINMAX_API_KEY"
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/webhooks/aB3dE9', {
  method: 'DELETE',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
  },
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "DELETE",
    "https://api.odinmax.com/v1/shop/webhooks/aB3dE9",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/webhooks/aB3dE9');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'DELETE',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างคำตอบ 200

{}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true400 Invalid body (VALIDATION_FAILED), or the Idempotency-Key header is missing or malformed (IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_INVALID)401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)409 The same Idempotency-Key is still being handled (IDEMPOTENCY_IN_PROGRESS), or the change is not possible now (the code says why)422 The Idempotency-Key was used for a different request (IDEMPOTENCY_KEY_REUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
post/v1/shop/webhooks/{id}/enableสิทธิ์ webhooks.manage

Turn a webhook back on after failures

พารามิเตอร์

  • idpath · จำเป็นstring
  • Idempotency-Keyheader · จำเป็น^[A-Za-z0-9_.:-]{1,255}$

ตัวอย่าง (curl)

curl -X POST https://api.odinmax.com/v1/shop/webhooks/aB3dE9/enable \
  -H "Authorization: Bearer $ODINMAX_API_KEY"
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/webhooks/aB3dE9/enable', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
  },
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "POST",
    "https://api.odinmax.com/v1/shop/webhooks/aB3dE9/enable",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/webhooks/aB3dE9/enable');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างคำตอบ 200

{}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true400 Invalid body (VALIDATION_FAILED), or the Idempotency-Key header is missing or malformed (IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_INVALID)401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)409 The same Idempotency-Key is still being handled (IDEMPOTENCY_IN_PROGRESS), or the change is not possible now (the code says why)422 The Idempotency-Key was used for a different request (IDEMPOTENCY_KEY_REUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
post/v1/shop/webhooks/{id}/testสิทธิ์ webhooks.manage

Send a ping now (5 a minute)

พารามิเตอร์

  • idpath · จำเป็นstring
  • Idempotency-Keyheader · จำเป็น^[A-Za-z0-9_.:-]{1,255}$

ตัวอย่าง (curl)

curl -X POST https://api.odinmax.com/v1/shop/webhooks/aB3dE9/test \
  -H "Authorization: Bearer $ODINMAX_API_KEY"
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/webhooks/aB3dE9/test', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
  },
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "POST",
    "https://api.odinmax.com/v1/shop/webhooks/aB3dE9/test",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/webhooks/aB3dE9/test');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างคำตอบ 200

{}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true400 Invalid body (VALIDATION_FAILED), or the Idempotency-Key header is missing or malformed (IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_INVALID)401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)409 The same Idempotency-Key is still being handled (IDEMPOTENCY_IN_PROGRESS), or the change is not possible now (the code says why)422 The Idempotency-Key was used for a different request (IDEMPOTENCY_KEY_REUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
get/v1/shop/webhook-deliveriesสิทธิ์ webhooks.manage

Delivery history of the last 30 days, newest first

พารามิเตอร์

  • webhookIdquerystring
  • statusqueryPENDING | DELIVERED | FAILED
  • eventqueryorder.created | order.paid | order.delivered | order.completed | order.cancelled | order.refunded | dispute.opened | dispute.updated | dispute.resolved | warranty.claimed | chat.message | review.created | listing.approved | listing.rejected | listing.out_of_stock | stock.low | payout.paid | payout.failed | shop.restricted | shop.reinstated | api_key.revoked
  • cursorquerystring
  • limitquery1-100 (50)

ตัวอย่าง (curl)

curl https://api.odinmax.com/v1/shop/webhook-deliveries \
  -H "Authorization: Bearer $ODINMAX_API_KEY"
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/webhook-deliveries', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
  },
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "GET",
    "https://api.odinmax.com/v1/shop/webhook-deliveries",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/webhook-deliveries');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างคำตอบ 200

{
  "items": [
    {
      "id": "string",
      "webhookId": "string",
      "event": "order.created",
      "eventId": "string",
      "status": "PENDING",
      "attempts": 1,
      "lastStatus": 1,
      "lastError": "string",
      "nextAttemptAt": "2026-10-01T12:00:00.000Z",
      "deliveredAt": "2026-10-01T12:00:00.000Z",
      "createdAt": "2026-10-01T12:00:00.000Z"
    }
  ],
  "nextCursor": "string"
}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
get/v1/shop/webhook-deliveries/{id}สิทธิ์ webhooks.manage

One delivery with the body that was sent

พารามิเตอร์

  • idpath · จำเป็นstring

ตัวอย่าง (curl)

curl https://api.odinmax.com/v1/shop/webhook-deliveries/aB3dE9 \
  -H "Authorization: Bearer $ODINMAX_API_KEY"
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/webhook-deliveries/aB3dE9', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
  },
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "GET",
    "https://api.odinmax.com/v1/shop/webhook-deliveries/aB3dE9",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/webhook-deliveries/aB3dE9');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างคำตอบ 200

{
  "id": "string",
  "webhookId": "string",
  "event": "order.created",
  "eventId": "string",
  "status": "PENDING",
  "attempts": 1,
  "lastStatus": 1,
  "lastError": "string",
  "nextAttemptAt": "2026-10-01T12:00:00.000Z",
  "deliveredAt": "2026-10-01T12:00:00.000Z",
  "createdAt": "2026-10-01T12:00:00.000Z"
}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)
post/v1/shop/webhook-deliveries/{id}/redeliverสิทธิ์ webhooks.manage

Send a delivery again (10 a minute)

พารามิเตอร์

  • idpath · จำเป็นstring
  • Idempotency-Keyheader · จำเป็น^[A-Za-z0-9_.:-]{1,255}$

ตัวอย่าง (curl)

curl -X POST https://api.odinmax.com/v1/shop/webhook-deliveries/aB3dE9/redeliver \
  -H "Authorization: Bearer $ODINMAX_API_KEY"
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/shop/webhook-deliveries/aB3dE9/redeliver', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
  },
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "POST",
    "https://api.odinmax.com/v1/shop/webhook-deliveries/aB3dE9/redeliver",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/shop/webhook-deliveries/aB3dE9/redeliver');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างคำตอบ 200

{}
200 Done. A repeated write with the same Idempotency-Key returns this answer again with the header idempotent-replayed: true400 Invalid body (VALIDATION_FAILED), or the Idempotency-Key header is missing or malformed (IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_INVALID)401 Missing, unknown, revoked or expired key (API_KEY_INVALID, API_KEY_EXPIRED), or a key of the other environment (API_KEY_WRONG_ENVIRONMENT)403 The key lacks the scope (API_SCOPE_MISSING), the shop may not give it (API_SCOPE_NOT_ALLOWED), the person who made the key lost that permission (API_KEY_CREATOR_FORBIDDEN), the address is not on the key's list (API_KEY_IP_DENIED), API access is not approved or paused (API_ACCESS_NOT_APPROVED, SHOP_API_SUSPENDED), or the shop is restricted or paused (SHOP_RESTRICTED, SHOP_PAUSED)409 The same Idempotency-Key is still being handled (IDEMPOTENCY_IN_PROGRESS), or the change is not possible now (the code says why)422 The Idempotency-Key was used for a different request (IDEMPOTENCY_KEY_REUSED)429 Rate limited (RATE_LIMITED): per key by your shop rank (120 a minute to start), all keys of a shop together 5 times that, 300 a minute per address503 The API is paused for maintenance (API_DISABLED) or answers reads only for now (API_READ_ONLY)

Older endpoints

get/v1/public/listingsสิทธิ์ listings.read

List your listings

ตัวอย่าง (curl)

curl https://api.odinmax.com/v1/public/listings \
  -H "Authorization: Bearer $ODINMAX_API_KEY"
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/public/listings', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
  },
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "GET",
    "https://api.odinmax.com/v1/public/listings",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/public/listings');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างคำตอบ 200

[
  {
    "shortId": "string",
    "status": "DRAFT",
    "title": {
      "en": "Genshin Impact AR 58",
      "th": "ไอดี Genshin AR 58"
    },
    "type": "TOPUP",
    "deliveryMode": "AUTO",
    "priceTh": {
      "amount": "35500",
      "currency": "THB"
    },
    "priceIntl": {
      "amount": "35500",
      "currency": "THB"
    },
    "price": "string",
    "priceThCustom": false,
    "quantityAvailable": 1,
    "imageUrl": "string",
    "salesCount": 1,
    "moderationNote": "string",
    "updatedAt": "2026-10-01T12:00:00.000Z"
  }
]
200 All listings of the shop401 Missing or unknown key403 Key lacks the scope, or the shop is restricted (SHOP_RESTRICTED) or paused for writes (SHOP_PAUSED)429 Rate limited: per key by your shop rank (120 a minute to start), 5 times that per shop, 300 per IP
patch/v1/public/listings/{shortId}สิทธิ์ listings.write

Change price, quantity or pause a listing

พารามิเตอร์

  • shortIdpath · จำเป็น^[A-Za-z0-9]{4,12}$

ตัวอย่าง (curl)

curl -X PATCH https://api.odinmax.com/v1/public/listings/aB3dE9 \
  -H "Authorization: Bearer $ODINMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"price":{"currency":"THB","amount":"string"},"priceTh":"string","priceIntl":"string","quantity":0,"paused":false}'
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/public/listings/aB3dE9', {
  method: 'PATCH',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"price":{"currency":"THB","amount":"string"},"priceTh":"string","priceIntl":"string","quantity":0,"paused":false}),
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "PATCH",
    "https://api.odinmax.com/v1/public/listings/aB3dE9",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    json={"price":{"currency":"THB","amount":"string"},"priceTh":"string","priceIntl":"string","quantity":0,"paused":False},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/public/listings/aB3dE9');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PATCH',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => '{"price":{"currency":"THB","amount":"string"},"priceTh":"string","priceIntl":"string","quantity":0,"paused":false}',
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างข้อมูลที่ส่ง

{
  "price": {
    "currency": "THB",
    "amount": "string"
  },
  "priceTh": "string",
  "priceIntl": "string",
  "quantity": 0,
  "paused": false
}

ตัวอย่างคำตอบ 200

{
  "shortId": "string",
  "status": "string",
  "quantityAvailable": 1
}
200 Updated400 Invalid body (VALIDATION_FAILED)401 Missing or unknown key403 Key lacks the scope, or the shop is restricted (SHOP_RESTRICTED) or paused for writes (SHOP_PAUSED)404 Not your listing (LISTING_NOT_FOUND)429 Rate limited: per key by your shop rank (120 a minute to start), 5 times that per shop, 300 per IP
post/v1/public/listings/{shortId}/stockสิทธิ์ stock.write

Add delivery codes to an automatic-delivery listing

พารามิเตอร์

  • shortIdpath · จำเป็น^[A-Za-z0-9]{4,12}$

ตัวอย่าง (curl)

curl -X POST https://api.odinmax.com/v1/public/listings/aB3dE9/stock \
  -H "Authorization: Bearer $ODINMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"codes":["string"]}'
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/public/listings/aB3dE9/stock', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"codes":["string"]}),
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "POST",
    "https://api.odinmax.com/v1/public/listings/aB3dE9/stock",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    json={"codes":["string"]},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/public/listings/aB3dE9/stock');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => '{"codes":["string"]}',
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างข้อมูลที่ส่ง

{
  "codes": [
    "string"
  ]
}

ตัวอย่างคำตอบ 201

{
  "added": 1
}
201 Codes added (duplicates in the request are counted once)400 Invalid body (VALIDATION_FAILED)401 Missing or unknown key403 Key lacks the scope, or the shop is restricted (SHOP_RESTRICTED) or paused for writes (SHOP_PAUSED)404 Not your listing (LISTING_NOT_FOUND)409 Not an automatic-delivery listing (STOCK_NOT_AUTO)429 Rate limited: per key by your shop rank (120 a minute to start), 5 times that per shop, 300 per IP
get/v1/public/ordersสิทธิ์ orders.read

List orders, newest first

พารามิเตอร์

  • statusqueryPAID | DELIVERED | COMPLETED | DISPUTED | REFUNDED
  • limitquery1-100 (50)

ตัวอย่าง (curl)

curl https://api.odinmax.com/v1/public/orders \
  -H "Authorization: Bearer $ODINMAX_API_KEY"
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/public/orders', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
  },
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "GET",
    "https://api.odinmax.com/v1/public/orders",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/public/orders');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างคำตอบ 200

[
  {
    "code": "string",
    "status": "string",
    "subtotal": {
      "amount": "35500",
      "currency": "THB"
    },
    "commission": {
      "amount": "35500",
      "currency": "THB"
    },
    "createdAt": "2026-10-01T12:00:00.000Z",
    "paidAt": "2026-10-01T12:00:00.000Z",
    "deliveredAt": "2026-10-01T12:00:00.000Z",
    "completedAt": "2026-10-01T12:00:00.000Z",
    "autoConfirmAt": "2026-10-01T12:00:00.000Z",
    "items": [
      {
        "shortId": "string",
        "title": {
          "en": "Genshin Impact AR 58",
          "th": "ไอดี Genshin AR 58"
        },
        "quantity": 1,
        "unitPrice": {
          "amount": "35500",
          "currency": "THB"
        }
      }
    ]
  }
]
200 Orders401 Missing or unknown key403 Key lacks the scope, or the shop is restricted (SHOP_RESTRICTED) or paused for writes (SHOP_PAUSED)429 Rate limited: per key by your shop rank (120 a minute to start), 5 times that per shop, 300 per IP
get/v1/public/orders/{code}สิทธิ์ orders.read

One order

พารามิเตอร์

  • codepath · จำเป็น^[A-Z0-9-]{4,24}$

ตัวอย่าง (curl)

curl https://api.odinmax.com/v1/public/orders/OM8K2D4F6H9J \
  -H "Authorization: Bearer $ODINMAX_API_KEY"
Node.js · Python · PHP

Node.js

const res = await fetch('https://api.odinmax.com/v1/public/orders/OM8K2D4F6H9J', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.ODINMAX_API_KEY}`,
  },
});
const data = await res.json();

Python

import os, requests

res = requests.request(
    "GET",
    "https://api.odinmax.com/v1/public/orders/OM8K2D4F6H9J",
    headers={"Authorization": f"Bearer {os.environ['ODINMAX_API_KEY']}"},
    timeout=30,
)
data = res.json()

PHP

<?php
$ch = curl_init('https://api.odinmax.com/v1/public/orders/OM8K2D4F6H9J');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ODINMAX_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

ตัวอย่างคำตอบ 200

{
  "code": "string",
  "status": "string",
  "subtotal": {
    "amount": "35500",
    "currency": "THB"
  },
  "commission": {
    "amount": "35500",
    "currency": "THB"
  },
  "createdAt": "2026-10-01T12:00:00.000Z",
  "paidAt": "2026-10-01T12:00:00.000Z",
  "deliveredAt": "2026-10-01T12:00:00.000Z",
  "completedAt": "2026-10-01T12:00:00.000Z",
  "autoConfirmAt": "2026-10-01T12:00:00.000Z",
  "items": [
    {
      "shortId": "string",
      "title": {
        "en": "Genshin Impact AR 58",
        "th": "ไอดี Genshin AR 58"
      },
      "quantity": 1,
      "unitPrice": {
        "amount": "35500",
        "currency": "THB"
      }
    }
  ]
}
200 The order401 Missing or unknown key403 Key lacks the scope, or the shop is restricted (SHOP_RESTRICTED) or paused for writes (SHOP_PAUSED)404 Not an order of your shop (ORDER_NOT_FOUND)429 Rate limited: per key by your shop rank (120 a minute to start), 5 times that per shop, 300 per IP

Webhook

ตั้ง URL ที่ศูนย์ผู้ขายแล้วเลือกเหตุการณ์ ทุกคำขอมีลายเซ็นใน X-Odinmax-Signature ให้ตรวจก่อนเชื่อ และใช้ X-Odinmax-Delivery กันรับซ้ำ ตอบ 2xx ภายใน 10 วินาที ถ้าไม่สำเร็จจะส่งซ้ำ 8 ครั้งในหนึ่งวัน

order.createdorder.paidorder.deliveredorder.completedorder.cancelledorder.refundeddispute.openeddispute.updateddispute.resolvedwarranty.claimedchat.messagereview.createdlisting.approvedlisting.rejectedlisting.out_of_stockstock.lowpayout.paidpayout.failedshop.restrictedshop.reinstatedapi_key.revokedping

ตัวอย่างข้อมูลที่ได้รับ

{
  "id": "string",
  "type": "order.created",
  "createdAt": "2026-10-01T12:00:00.000Z",
  "data": {
    "order": {
      "code": "string",
      "status": "string",
      "subtotal": {
        "amount": "35500",
        "currency": "THB"
      },
      "items": [
        {}
      ]
    }
  }
}

ตรวจลายเซ็น (Node.js)

import crypto from 'node:crypto';

// header = request.headers['x-odinmax-signature'], rawBody = the body exactly as received
const [t, v1] = header.split(',').map((p) => p.split('=')[1]);
const expected = crypto.createHmac('sha256', secret).update(`${t}.${rawBody}`).digest('hex');
const fresh = Math.abs(Date.now() / 1000 - Number(t)) < 300;
const ok = fresh && crypto.timingSafeEqual(Buffer.from(v1, 'hex'), Buffer.from(expected, 'hex'));

คู่มือ: curl · Node.js · Python · PHP