Brands

On this page, we'll dive into the different brand endpoints you can use to get or sync our brand information. We'll look at how to list and get brand information.

The brand model

The brand model contains all the information about a brand, such as their name, ids, and images. It also contains a reference to when it was last updated. You can use this to only fetch brands that have been updated since your last sync.

Properties

  • Name
    id
    Type
    string
    Description

    Unique identifier for the brand.

  • Name
    name
    Type
    string
    Description

    The brand name.

  • Name
    logo
    Type
    string
    Description

    An URL to the logo of the brand.

  • Name
    updated_at
    Type
    timestamp
    Description

    Timestamp of when the brands was last updated.


GET/v1/brands

List all brands

This endpoint allows you to retrieve a list of brands from VDH-Solar. Refer to the list at the top of this page to see which properties are included with brand objects.

Query parameters

You can use the query parameters below to filter the list of brands you receive from the API. You can also paginate the results. Please check the pagination section for more information.

  • Name
    name
    Type
    string
    Description

    Filter on the name of the brand. This will use a %LIKE% query.

  • Name
    id
    Type
    integer
    Description

    We will do an exact match on the brand id. It would be beter to use the single brand endpoint for this.

  • Name
    updated_before
    Type
    timestamp
    Description

    We will only return the brands that where updated before this timestamp.

  • Name
    updated_after
    Type
    timestamp
    Description

    We will only return the brands that where updated after this timestamp.

Request

GET
/v1/brands
$client = new \VdhSolar\ApiClient('eyJ...');

$client->brands->list([
  'name' => 'Solar',
  'updated_since' => 555931527,
]);

Response

{
  "data": [
    {
      "id": "1",
      "name": "VDH Solar",
      "logo": "https://vdh-solar.nl/images/...",
      "updated_at": 555931527,
    },
    {
      // etc...
    },
  ]
}

GET/v1/brands/:id

List a single brand

This endpoint allows you to to list all information about a single brand. Please let us know if you need more information about a brand, we will add this to the response as requested.

Request

GET
/v1/brands/1
$client = new \VdhSolar\ApiClient('eyJ...');

$client->brands->get(1);

Response

{
  "data": {
    "id": "1",
    "name": "VDH Solar",
    "logo": "https://vdh-solar.nl/images/...",
    "updated_at": 555931527,
  }
}

Was this page helpful?