# Create a fulfillment&#x20;

Method : <mark style="color:green;">**POST**</mark> &#x20;

{% code fullWidth="false" %}

```url
https://os.vucustom.com/api/v1/fulfillments
```

{% endcode %}

<details>

<summary>Example Request </summary>

{% code fullWidth="true" %}

```json
{
  "fulfillment": {
    "tracking_number": "12345",
    "carrier_code": "FED",
    "carrier_name": "Fedex",
    "service_code": "NDA",
    "service_name": "Next day air",
	"weight": 1.5,
    "recipient": {
      "city": "Test",
      "country": "US",
      "address_1": "test str 1",
      "state_region": "DE",
      "phone": "123",
      "name": "Test Test",
     "postal_code": "123"
    },
    "order_lines": [
      {
        "id": "391",
        "line_reference": "12345",
        "quantity": 3
      }
    ],
    "dimensions": {
      "length": 3,
      "height": 3.5,
      "width": 3
    }
  }
}
```

{% endcode %}

</details>

Request Body Schema (Fulfillment )

<table><thead><tr><th width="198">Field Name</th><th width="85">Type</th><th width="98">Required</th><th>Description</th></tr></thead><tbody><tr><td>tracking_number</td><td>string</td><td>Yes</td><td>Shipment tracking number</td></tr><tr><td>carrier_code</td><td>string</td><td>Yes</td><td>Carrier identifier code</td></tr><tr><td>carrier_name</td><td>string</td><td>Yes</td><td>Carrier name</td></tr><tr><td>service_code</td><td>string</td><td>Yes</td><td>Service level code</td></tr><tr><td>service_name</td><td>string</td><td>Yes</td><td>Service level name</td></tr><tr><td>weight</td><td>string</td><td>Yes</td><td>Package weight</td></tr><tr><td>recipient </td><td>object</td><td>Yes</td><td>Delivery recipient details. refer to the schema below for details.</td></tr><tr><td>order_lines</td><td>array</td><td>Yes</td><td>This is an array of objects. Each object is order line item. refer to the schema below for more details.</td></tr><tr><td>dimensions</td><td>object</td><td>Yes</td><td>Package dimensions object. refer to the schema below for more information.</td></tr></tbody></table>

Recipient Schema

<table><thead><tr><th width="170">Field Name</th><th width="100">Type</th><th width="104">Required</th><th>Description</th></tr></thead><tbody><tr><td>city</td><td>string</td><td>Yes</td><td>Recipient city</td></tr><tr><td>country_code</td><td>string</td><td>Yes</td><td>Recipient country code</td></tr><tr><td>address_1</td><td>string</td><td>Yes</td><td>Primary address</td></tr><tr><td>state_region</td><td>string</td><td>Yes</td><td>State/region code</td></tr><tr><td>phone</td><td>string</td><td>Yes</td><td>Contact phone</td></tr><tr><td>name</td><td>string</td><td>Yes</td><td>Recipient name</td></tr><tr><td>postal_code</td><td>string</td><td>Yes</td><td>Postal code</td></tr></tbody></table>

Orderline schema

<table><thead><tr><th width="169">Field Name</th><th width="99">Type</th><th width="119">Required</th><th>Description</th></tr></thead><tbody><tr><td>id</td><td>String</td><td>Yes</td><td>Order line ID</td></tr><tr><td>line_reference</td><td>String</td><td>Yes</td><td>Line reference</td></tr><tr><td>quantity</td><td>Integer</td><td>Yes</td><td>Quantity being fulfilled</td></tr></tbody></table>

Dimensions Schema

<table><thead><tr><th width="159">Field Name</th><th width="89">Type</th><th width="118">Required</th><th>Description</th></tr></thead><tbody><tr><td>length</td><td>Integer</td><td>No</td><td>Package length</td></tr><tr><td>height</td><td>Integer</td><td>No</td><td>Package height</td></tr><tr><td>width</td><td>Integer</td><td>No</td><td>Package width</td></tr></tbody></table>

{% tabs %}
{% tab title="200" %}
**`200 Successful response example`**

```json
{
  "fulfillment": {
    "tracking_number": "12345",
    "carrier_code": "FED",
    "carrier_name": "Fedex",
    "service_code": "NDA",
    "service_name": "Next day air",
	"weight": 1.5,
    "recipient": {
      "city": "Test",
      "country": "US",
      "address_1": "test str 1",
      "state_region": "DE",
      "phone": "123",
      "name": "Test Test",
     "postal_code": "123"
    },
    "order_lines": [
      {
        "id": "391",
        "line_reference": "12345",
        "quantity": 3
      }
    ],
    "dimensions": {
      "length": 3,
      "height": 3.5,
      "width": 3
    }
  }
}
```

{% endtab %}

{% tab title="401 " %}
**`401 Unauthorized`**

`The client doesn’t have correct authentication credentials.`

```
{
"errors": "[API] Invalid API key or secret (unrecognized login or wrong password)"
}
```

{% endtab %}

{% tab title="403" %}
**`403 Forbidden`**

`The server is refusing to respond. This is typically caused by incorrect access.`
{% endtab %}

{% tab title="404" %}
**`404 Not Found`**

`The requested resource was not found but could be available again in the future.`
{% endtab %}

{% tab title="422" %}
**`422 Unprocessable Entity`**
{% endtab %}

{% tab title="5xx" %}
**`5xx Errors`**

`An internal error occurred in VU Admin.`
{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://vu-custom.gitbook.io/vu-custom/admin-api/fulfillments/create-a-fulfillment.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
