# VU OS Admin API Overview

### Introduction

Admin API enables you to programmatically interact with VU OS, allowing you to build integrations and automate workflows. With this API, you can manage orders, products, fulfillments, and customer data.

### Key Features

* **Customer Data:** Handle customer accounts and addresses (CRUD)
* **Order Management:** Create, retrieve, and update orders and tags (CRUD)
* **Product Catalog:** Manage products (CRUD)&#x20;
* **Recipes:** Retrieve recipes based on recipe ID
* **Fulfillment Tracking:** Track shipping and delivery information

{% hint style="info" %}
Webhook Support: Receive real-time notifications of important events
{% endhint %}

### Authentication

All Admin API queries require a valid API key and secret. <mark style="color:green;">Please contact your assigned Solution Architect to obtain these</mark>. Once you have these here is what the request should look like:

* Use HTTPS
* Include authentication credentials
* Specify an API version
* Set the Content-Type header to application/json.&#x20;

{% hint style="info" %}
The API accepts and returns JSON data.
{% endhint %}

Example request:

```bash
curl -X GET 'https://os.vucustom.com/api/v1/products' \
  -u username:password \
  -H 'Content-Type: application/json'
```

<details>

<summary>Complete Response - Sample References</summary>

The following code sample demonstrates all response types that the API is capable of returning.

{% code title="JSON complete sample" overflow="wrap" %}

```json
    "order": [
        {
            "b2b": {
                "individual": {
                    "first_name": "John",
                    "id": 12345,
                    "last_name": "Smith"
                },
                "organization": {
                    "organization_group": {
                        "league": {
                            "pro": "nhl"
                        }
                    },
                    "id": 12345,
                    "name": "ABC Company "
                },
                "customer":{
                    "id": 1,
                    "name": "Test"
                }
            },
            "created_at": "2022-10-31T01:54:56.271Z",
            "currency": "JPY",
            "custom_attributes": {"order_type": "BOOKING"},
            "id": 12345,
            "note": "Sample note updated.",
            "order_date": "2022-10-31T01:54:56.271Z",
            "order_lines": [
                {
                    "custom_attributes": {},
                    "customer_requested_date": "2024-03-09",
                    "estimated_arrival_date": "2024-03-09",
                    "ex_factory_date": {
                        "current": "2024-03-09",
					    "changes": [
						    {
							    "reason_code": "initial",
							    "reason_description": "Initial Value",
							    "created_at": "2024-02-23T08:00:40.773Z",
							    "estimated_arrival_date": "2024-03-31",
							    "ex_factory_date": "2024-03-09"
						    }
                        ]
                     },
                    "factory_code": "factory123",
                    "id": 12345,
                    "line_reference": "59861396",
                    "price": 70,
                    "product_description": "My Widget",
                    "product_id": 12345,
                    "purchase_order_number": "po-12345",
                    "quantity": 1,
                    "recipe_token": "1609c0e8",
                    "sales_order_number":"so-12345",
                    "sku": "SKU123",
                    "status": "new_order",
                    "tags": [
                        "tag1",
                        "tag2"
                    ],
                    "upc": "UPC123",
                     "fulfillments": [
					{
						"created_at": "2024-03-21T08:31:48.653Z",
						"updated_at": "2024-03-21T08:31:48.653Z",
						"quantity": 1,
						"id": 79,
						"tracking_number": "test1",
						"carrier_name": "test",
						"carrier_code": "test",
						"service_name": "test",
						"service_code": "test",
						"recipient_address_1": "test",
						"recipient_city": "test",
						"recipient_name": "test",
						"recipient_state_region": "test",
						"recipient_country": "test",
						"recipient_postal_code": "test",
						"recipient_phone": "test",
						"weight": 0,
						"width": 0,
						"height": 0,
						"length": 0
					}
				]
                }
            ],
            "order_number": "ord-12345",
            "purchase_order_number": "po-12345",
            "sales_order_number": "so-12345",
            "ship_method_carrier": "ups",
            "ship_method_code": "ups_standard",
            "ship_method_description": "Standard",
            "ship_to": {
                "account_number": "SHPTO123",
                "address_1": "123 Main St",
                "address_2": "",
                "city": "Ridgewood",
                "company_name": "VU Custom",
                "country": "US",
                "created_at": "2022-10-31T01:54:56.271Z",
                "email": "test@test.com",
                "first_name": "John",
                "id": 12345,
                "last_name": "Smith",
                "phone": "2011231234",
                "postal_code": "07450",
                "state_region": "NJ",
                "updated_at": "2022-10-31T01:54:56.271Z"
            },
            "sold_to": {
                "account_number": "SLDTO123",
                "address_1": "123 Main St",
                "address_2": "",
                "city": "Ridgewood",
                "company_name": "VU Custom",
                "country": "US",
                "created_at": "2022-10-31T01:54:56.271Z",
                "email": "test@test.com",
                "first_name": "John",
                "id": 12345,
                "last_name": "Smith",
                "phone": "2011231234",
                "postal_code": "07450",
                "state_region": "NJ",
                "updated_at": "2022-10-31T01:54:56.271Z"
            },
            "tags": [
                "tag1",
                "tag2"
            ],
            "updated_at": "2022-10-31T01:54:56.271Z"
        }
    ]
}'
```

{% endcode %}

</details>

#### API Versioning

The API is versioned to ensure stability for your integrations. Include the version in all API requests:

```
https://os.vucustom.com/api/{api_version}/{resource}
```

Current version: `v1`

### Getting Help

1. Use the search feature in this documentation portal to find answers first.
2. Contact your Solution Architect for technical support if you don't find answers in this documentation portal.


---

# 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/vu-os-admin-api-overview.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.
