ArchFindrالمطوّرون
مرجع واجهة البرمجة

الطلبات

قراءة طلبات المشترين والرد عليها وتغيير حالتها.

GET
/api/v1/key/requests

The vendor's requests, filterable like the dashboard inbox; a platform key lists all requests.

Requires the requests:read scope.

التفويض

apiKey requests:read
headerالتفويضBearer <token>

An API key created in the vendor workspace. Send it as Authorization: Bearer afk_....

النطاق: requests:read

معاملات الاستعلام

q?string
الطولlength <= 255
page?integer
المدى1 <= value
perPage?integer
المدى1 <= value <= 100
status?"new"
القيمة ضمن"new"
type?"info"
القيمة ضمن"info"
brand?string
unread?boolean

جسم الاستجابة

Success

application/json
  1. response
data*array<>
metadata*
curl -X GET "https://example.com/api/v1/key/requests"
{  "data": [    {      "provider": {        "id": "string",        "name": "string",        "slug": "string",        "status": "pending",        "logoUrl": "string"      },      "brand": {        "id": "string",        "name": "string",        "slug": "string",        "logoUrl": "string"      },      "createdAt": "string",      "id": "string",      "status": "quoted",      "type": "price",      "updatedAt": "string",      "product": {        "brand": {          "id": "string",          "name": "string",          "slug": "string",          "logoUrl": "string"        },        "compareAtPrice": 0,        "currency": "string",        "hasBim": true,        "id": "string",        "inStock": true,        "isNew": true,        "name": "string",        "price": 0,        "priceOnRequest": true,        "slug": "string",        "type": "string",        "coverUrl": "string",        "hoverUrl": "string"      },      "reference": "string",      "isGuest": true,      "messagesCount": 0,      "subject": "string",      "unread": true,      "contact": {        "name": "string",        "country": "string",        "email": "string",        "profession": "string",        "company": "string"      },      "lastMessage": {        "createdAt": "string",        "excerpt": "string",        "author": "provider"      }    }  ],  "metadata": {    "total": 0,    "perPage": 0,    "currentPage": 0,    "lastPage": 0,    "firstPage": 0,    "firstPageUrl": "string",    "lastPageUrl": "string",    "nextPageUrl": "string",    "previousPageUrl": "string"  }}

One request with its whole thread

GET
/api/v1/key/requests/{id}

One request with its whole thread. Does not mark it read for the team.

Requires the requests:read scope.

التفويض

apiKey requests:read
headerالتفويضBearer <token>

An API key created in the vendor workspace. Send it as Authorization: Bearer afk_....

النطاق: requests:read

معاملات المسار

id*string

جسم الاستجابة

Success

application/json
  1. response
data*
curl -X GET "https://example.com/api/v1/key/requests/string"
{  "data": {    "provider": {      "id": "string",      "name": "string",      "slug": "string",      "status": "pending",      "logoUrl": "string"    },    "brand": {      "id": "string",      "name": "string",      "slug": "string",      "logoUrl": "string"    },    "createdAt": "string",    "id": "string",    "status": "quoted",    "type": "price",    "updatedAt": "string",    "product": {      "brand": {        "id": "string",        "name": "string",        "slug": "string",        "logoUrl": "string"      },      "compareAtPrice": 0,      "currency": "string",      "hasBim": true,      "id": "string",      "inStock": true,      "isNew": true,      "name": "string",      "price": 0,      "priceOnRequest": true,      "slug": "string",      "type": "string",      "coverUrl": "string",      "hoverUrl": "string"    },    "messages": [      {        "createdAt": "string",        "id": "string",        "body": "string",        "attachments": [          {            "name": "string",            "url": "string",            "size": 0          }        ],        "author": "provider",        "authorName": "string"      }    ],    "reference": "string",    "isGuest": true,    "messagesCount": 0,    "subject": "string",    "unread": true,    "contact": {      "name": "string",      "country": "string",      "email": "string",      "profession": "string",      "company": "string"    },    "lastMessage": {      "createdAt": "string",      "excerpt": "string",      "author": "provider"    }  }}
PATCH
/api/v1/key/requests/{id}

Changes the request status (open, quoted, closed).

Requires the requests:write scope.

التفويض

apiKey requests:write
headerالتفويضBearer <token>

An API key created in the vendor workspace. Send it as Authorization: Bearer afk_....

النطاق: requests:write

معاملات المسار

id*string

جسم الطلب

application/json
  1. body
status*"new"
القيمة ضمن"new"

جسم الاستجابة

Success

application/json
  1. response
data*
curl -X PATCH "https://example.com/api/v1/key/requests/string" \  -H "Content-Type: application/json" \  -d '{    "status": "new"  }'
{  "data": {    "provider": {      "id": "string",      "name": "string",      "slug": "string",      "status": "pending",      "logoUrl": "string"    },    "brand": {      "id": "string",      "name": "string",      "slug": "string",      "logoUrl": "string"    },    "createdAt": "string",    "id": "string",    "status": "quoted",    "type": "price",    "updatedAt": "string",    "product": {      "brand": {        "id": "string",        "name": "string",        "slug": "string",        "logoUrl": "string"      },      "compareAtPrice": 0,      "currency": "string",      "hasBim": true,      "id": "string",      "inStock": true,      "isNew": true,      "name": "string",      "price": 0,      "priceOnRequest": true,      "slug": "string",      "type": "string",      "coverUrl": "string",      "hoverUrl": "string"    },    "messages": [      {        "createdAt": "string",        "id": "string",        "body": "string",        "attachments": [          {            "name": "string",            "url": "string",            "size": 0          }        ],        "author": "provider",        "authorName": "string"      }    ],    "reference": "string",    "isGuest": true,    "messagesCount": 0,    "subject": "string",    "unread": true,    "contact": {      "name": "string",      "country": "string",      "email": "string",      "profession": "string",      "company": "string"    },    "lastMessage": {      "createdAt": "string",      "excerpt": "string",      "author": "provider"    }  }}
POST
/api/v1/key/requests/{id}/messages

Replies to the buyer, authored as the key's creator.

Requires the requests:write scope.

التفويض

apiKey requests:write
headerالتفويضBearer <token>

An API key created in the vendor workspace. Send it as Authorization: Bearer afk_....

النطاق: requests:write

معاملات المسار

id*string

جسم الطلب

application/json
  1. body
body*string
الطول1 <= length <= 5000
attachments?array<>
الطولlength <= 10

جسم الاستجابة

Success

application/json
  1. response
data*
curl -X POST "https://example.com/api/v1/key/requests/string/messages" \  -H "Content-Type: application/json" \  -d '{    "body": "string"  }'
{  "data": {    "createdAt": "string",    "id": "string",    "body": "string",    "attachments": [      {        "name": "string",        "url": "string",        "size": 0      }    ],    "author": "provider",    "authorName": "string"  }}