Models

On this page, we'll dive into the different models that don't have specific endpoints. You will be able to find the expected structure of some data when adding stuff via the API.

The address model

The address model contains all the information about an addres, such as the address and other contact information.

Required properties

  • Name
    address_line_1
    Type
    string
    Required
    required
    Description

    The street name of the address.

  • Name
    address_line_2
    Type
    integer
    Required
    required
    Description

    The number of the address.

  • Name
    city
    Type
    string
    Required
    required
    Description

    The city of the address.

  • Name
    postal_code
    Type
    string
    Required
    required
    Description

    The postal code of the address.

Optional properties

When you are using this model in the context where a user is known in the request, we will prefill the properties below with the user's information. It this is not the case, these properties are required.

  • Name
    first_name
    Type
    string
    Description

    The first name of the person connected to this address.

  • Name
    last_name
    Type
    string
    Description

    The last name of the person connected to this address.

  • Name
    address_line_3
    Type
    string
    Description

    The number addition of the address.

  • Name
    email
    Type
    string
    Description

    The email address of the person connected to this address.

  • Name
    company
    Type
    string
    Description

    The company name of the person connected to this address.

  • Name
    phone_number
    Type
    string
    Description

    The phone number of the person connected to this address.

  • Name
    vat_number
    Type
    string
    Description

    The VAT number of the company connected to this address.

Example address model

{
  "first_name": "John",
  "last_name": "Doe",
  "address_line_1": "Finlandlaan",
  "address_line_2": "1",
  "address_line_3": "A",
  "city": "Hazerswoude-Dorp",
  "postal_code": "2391 PV",
  "email": "j.doe@vdh-solar.nl",
  "company": "VDH Solar",
  "phone_number": "+31172235990",
  "vat_number": "NL000000000B01",
}

The order item model

The order item model contains only the product id and quantity. Very simple stuff!

Required properties

This model has some readonly properties. This means you will not be able to add them to POST requests but they will be returned in GET requests.

  • Name
    product_id
    Type
    integer
    Required
    required
    Description

    The id of the product.

  • Name
    quantity
    Type
    integer
    Required
    required
    Description

    The quantity of the product.

  • Name
    unit_price_excl_vat
    Type
    integer
    Readonly
    readonly
    Description

    This is the unit price of the product excluding VAT in cents.

  • Name
    unit_price_incl_vat
    Type
    integer
    Readonly
    readonly
    Description

    This is the unit price of the product including VAT in cents.

  • Name
    total_price_excl_vat
    Type
    integer
    Readonly
    readonly
    Description

    This is the total price of the product excluding VAT in cents.

  • Name
    total_price_incl_vat
    Type
    integer
    Readonly
    readonly
    Description

    This is the total price of the product including VAT in cents.

  • Name
    vat_amount
    Type
    integer
    Readonly
    readonly
    Description

    This is the VAT amount of the product in cents.

Example order item model

[
  {
    "product_id": 1,
    "quantity": 20,
    "unit_price_excl_vat": 10000,
    "unit_price_incl_vat": 12100,
    "total_price_excl_vat": 10000,
    "total_price_incl_vat": 12100,
    "vat_amount": 2100,
  },
  // ...
]

The order shipment model

This model contains information about the shipment of an order.

Properties

This model only contains readonly properties. This means you will not be able to add them to POST requests but they will be returned in GET requests.

  • Name
    style
    Type
    string
    Readonly
    readonly
    Description

    The selected type of shipment.

  • Name
    requested_date
    Type
    string
    Readonly
    readonly
    Description

    The request date of delivery/pick-up.

  • Name
    shipped_date
    Type
    string
    Readonly
    readonly
    Description

    The date the order was shipped.

  • Name
    delivered_date
    Type
    string
    Readonly
    readonly
    Description

    The date the order was delivered or picked-up.

  • Name
    track_and_trace
    Type
    string
    Readonly
    readonly
    Description

    The track and trace URL from one of our carriers.

Example order shipment model

{
  "style": "delivery",
  "requested_date": "2024-12-31",
  "shipped_date": "2024-12-31",
  "delivered_date": "2024-12-31",
  "track_and_trace": "https:://track-and-trace.com/123456",
}

The payment model

This model contains information about the payment of an order.

Properties

This model only contains readonly properties. This means you will not be able to add them to POST requests but they will be returned in GET requests.

  • Name
    status
    Type
    string
    Readonly
    readonly
    Description

    The current status of the payment.

  • Name
    pay
    Type
    string
    Readonly
    readonly
    Description

    This is an URL where the payment can be done.

Example payment model

{
  "status": "pending",
  "pay": "https://vdh-solar.nl/pay/order/1"
}

Was this page helpful?