Skip to main content

Vinaway API Documentation

Integrate your e-commerce store with Vinaway's fulfillment network. Automate order processing, track shipments, and manage products directly from your application.

Introduction

The Vinaway API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Production: https://api.vinaway.io/api

Development: https://dev.api.vinaway.io/api

Authentication

Authenticate your API requests using a Bearer token. To obtain a token, you need to exchange your email and password.

POST /token

Request Body

{
    "email": "your_email@example.com",
    "password": "your_password"
}

Response

{
    "access_token": "76|5lrXZKyBRTRL8pDvpUBNZ...",
    "token_type": "Bearer",
    "expires_in": 18000
}

Create Order

Create a new production order. This endpoint accepts a list of items to be fulfilled.

POST /orders

Parameters

Field Type Required Description
type integer Yes Order type (1: Production, 2: Dropship, 3: Design)
external_order_id string No Your unique identifier for this order
production_line_id integer Yes ID of the production line (e.g., 1 for Standard)
customer_name string Yes Name of the customer
items array Yes Array of items to produce

Example Request

{
    "type": 1,
    "external_order_id": "ORD-2024-001",
    "production_line_id": 1,
    "customer_name": "John Doe",
    "address1": "123 Main St",
    "city": "New York",
    "zip": "10001",
    "country": "US",
    "state": "NY",
    "items": [
        {
            "product_id": 1,
            "product_sku_id": 1,
            "quantity": 1,
            "mockup1": "https://example.com/mockup-front.png",
            "productSurfaces": [
                {
                    "product_surface_id": 3,
                    "design_png": "https://example.com/design.png"
                }
            ]
        }
    ]
}

Success Response

{
    "success": true,
    "message": "Seller Order Created Successfully.",
    "id": 313,
    "internal_order_id": "VN7PIEA4FA5U"
}

Get Order

Retrieve details of a specific order by its internal ID.

GET /orders/{internal_order_id}

Example Request

GET https://api.vinaway.io/api/orders/VN7PIEA4FA5U

Response

{
    "internal_order_id": "VN7PIEA4FA5U",
    "status": 0,
    "amount_total": 2470,
    "customer_name": "John Doe",
    "line_items": [
        {
            "product": {
                "name": "Unisex T-Shirt"
            },
            "quantity": 1
        }
    ]
}

List Orders

Retrieve a paginated list of your orders.

GET /orders

Query Parameters

Parameter Type Description
page integer Page number (default: 1)
limit integer Number of items per page (default: 15)

Production Lines

Get a list of available production lines to use when creating an order.

GET /production-lines

Response

{
    "total": 2,
    "data": [
        {
            "id": 1,
            "name": "Standard",
            "description": "Inproduction: 1-3 days\nShip : 3-7days",
            "level": 1
        },
        {
            "id": 2,
            "name": "Express",
            "description": "Inproduction 4h\nShip 1-3 days",
            "level": 2
        }
    ]
}

Products

Get a list of all products.

GET /products

Query Parameters

Parameter Type Description
page integer Page number (default: 1)
limit integer Number of items per page (default: 100)

Response

{
    "total": 50,
    "data": [
        {
            "id": 1,
            "name": "Classic T-Shirt",
            "sku": "TSHIRT-001"
        }
    ]
}

Variants

Get a list of all product variants (SKUs). Use these IDs when creating orders.

GET /product-skus

Query Parameters

Parameter Type Description
page integer Page number (default: 1)
limit integer Number of items per page (default: 100)

Response

{
    "total": 120,
    "data": [
        {
            "id": 101,
            "sku": "TSHIRT-BLK-S",
            "product_name": "Classic T-Shirt",
            "color": "Black",
            "size": "S"
        }
    ]
}