> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a vendor returns

> Create a vendor returns

### Request body

`CreateVendorReturnRequest`

<ParamField body="items" type="CreateVendorReturnItemRequest[]" required />

<ParamField body="notes" type="string,null" />

<ParamField body="purchase_order_id" type="string,null" />

<ParamField body="supplier_id" type="string" required />

### Responses

<ResponseField name="201" type="VendorReturnResponse" />

<ResponseField name="400" type="ErrorBody" />

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.stateset.com/api/v1/vendor-returns' \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "items": [
      {
        "product_id": "string",
        "quantity": "string",
        "reason": null,
        "unit_cost": "string"
      }
    ],
    "notes": null,
    "purchase_order_id": null,
    "supplier_id": "string"
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "created_at": "string",
    "credit_generated": true,
    "id": "string",
    "number": "string",
    "status": "string",
    "supplier_id": "string",
    "total_credit": "string"
  }
  ```
</ResponseExample>
