Request

A Request object represents a checkin call with a shopping basket.

GET a list of requests

Query a list of requests. Parameters for pagination, query condition and sort order can be used for this method, see pagination and query pages for details.

Get a list of requests example

curl /v2/requests?page=1&per_page=20&filter=&sort=  -H "X-Api-Key:.." -H "Authorization:JWT .."

Successful return object:

{
    "page": 1,
    "per_page": 20,
    "data": []
}

GET a single requests by ID

Query a requests object by ID.

  • The basket field contains the raw JSON object for a checkout basket.

Get a single requests example

curl /v2/requests/1 -H "X-Api-Key:.." -H "Authorization:JWT .."

Successful return object:

{
    "id": 1,
    "app_id": 20,
    "buyer_id": 3,
    "seller_id": 2,
    "groups": "group name",
    "basket": "{}",
    "created_at": ""
}

POST a requests

Create a requests entity.

Field Type Description
app_id int App.ID
buyer_id int User.ID
seller_id int Seller ID
group string group name
basket string

A basket example:

```

{% sample lang="bash" %}
POST to create a requests:
```bash
curl -X POST -d '{"app_id":100,"buyer_id":11}' /v2/requests -H "X-Api-Key:.." -H "Authorization:JWT .."

Successful return:

{
    "status": "OK",
    "id": 123
}

PUT a requests

Update a requests entity.

Update a requests example

curl -X PUT -d '{"groups":"my group"}' /v2/requests/1 -H "X-Api-Key:.." -H "Authorization:JWT .."

Successful return:

{
    "status": "OK"
}

DELETE a requests

Delete a requests entity. Only system admin role can make this request.

Delete a requests example

curl -X DELETE /v2/requests/1 -H "X-Api-Key:.." -H "Authorization:JWT .."

Successful return:

{
    "status": "OK"
}

results matching ""

    No results matching ""