API Docs


Customers API

{warning} Please note that the URI for this endpoint should not include api/{$version} before customer, which means that the url will be: example.com/api/customers

Get all Customers.

Method URI Headers
GET /api/customers Default

Headers

{info} The Authorization:Bearer is the token that the server needs in order to auth the request. See API configuration for more details.

Content-Type:application/json
Accept:application/json
Authorization:Bearer "{token}"

{success} Success Response

Code 200

Response

{
  {
    "status": "Success",
    "data": {
        "message": "All customers",
        "total": 1,
        "customers": [
            {
                "id": 310000,
                "company_name": "Customer 1",
                "address_1": "Address11",
                "address_2": "Address1",
                "city": "Madrid",
                "country_id": 724,
                "state": "Madrid",
                "nif": "Y34790134E",
                "postal_code": "28901",
                "markup": 1,
                "status_id": 1,
                "price_list_id": 1,
                "qualification": null,
                "qualification_status": null,
                "created_at": "2021-03-17T08:32:33.000000Z",
                "updated_at": "2022-02-18T09:30:10.000000Z",
                "deleted_at": null
            }
        ]
    }
}

{danger} Error Response

Code 401

Reason Resource not found

Response

{
    "data": "Resource not found"
}

Get Customer By ID.

Method URI Headers
GET /api/customers/{customer_id} Default

Headers

{info} The Authorization:Bearer is the token that the server needs in order to auth the request. See API configuration for more details.

Content-Type:application/json
Accept:application/json
Authorization:Bearer "{token}"

{success} Success Response

Code 200

Response

{
  {
    "status": "Success",
    "data": {
        "message": "All customers",
        "total": 1,
        "customers": [
            {
                "id": 310000,
                "company_name": "Customer 1",
                "address_1": "Address11",
                "address_2": "Address1",
                "city": "Madrid",
                "country_id": 724,
                "state": "Madrid",
                "nif": "Y34790134E",
                "postal_code": "28901",
                "markup": 1,
                "status_id": 1,
                "price_list_id": 1,
                "qualification": null,
                "qualification_status": null,
                "created_at": "2021-03-17T08:32:33.000000Z",
                "updated_at": "2022-02-18T09:30:10.000000Z",
                "deleted_at": null
            }
        ]
    }
}

{danger} Error Response

Code 401

Reason Resource not found

Response

{
    "data": "Resource not found"
}

Get Customer Subscriptions.

Method URI Headers
GET /api/customers/{customer_id}/subscritpions Default

Headers

{info} The Authorization:Bearer is the token that the server needs in order to auth the request. See API configuration for more details.

Response-Type:application/json
Accept:application/json
Authorization:Bearer "{token}"

{success} Success Response

Code 200

Response

{
    "status": "Success",
    "data": {
        "message": "Customer Subscriptions",
        "total": 1,
        "subscriptions": [
            {
                "id": 610000,
                "name": "Microsoft 365 Business Basic",
                "azure_plan_id": null,
                "subscription_id": "38A38E69-CF31-4F08-83BF-B34DB8FD0F65",
                "customer_id": 310000,
                "product_id": "BD938F12-058F-4927-BBA3-AE36B1D2501C",
                "catalog_item_id": null,
                "order_id": "1717bd87-3f50-4ab9-b964-fae2be7ef449",
                "amount": "24",
                "instance_id": "1",
                "budget": null,
                "msrpid": null,
                "expiration_data": "2022-04-15",
                "CancellationAllowedUntil": "[]",
                "refundableQuantity": [
                    []
                ],
                "autorenew": 0,
                "billing_period": "annual",
                "billing_type": "license",
                "term": "P1Y",
                "currency": "EUR",
                "tenant_name": "customertagydes889j8.onmicrosoft.com",
                "status_id": 2,
                "created_at": "2021-03-19T04:50:52.000000Z",
                "updated_at": "2022-03-17T19:58:53.000000Z",
                "changes_on_renew": null
            }
        ]
    }
}

{danger} Error Response

Code 401

Reason Resource not found

Response

{
    "data": "Resource not found"
}

Get Customer Subscription By ID.

Method URI Headers
GET /api/customers/{customer_id}/subscritpions/{subscritpion_id} Default

Headers

{info} The Authorization:Bearer is the token that the server needs in order to auth the request. See API configuration for more details.

Response-Type:application/json
Accept:application/json
Authorization:Bearer "{token}"

{success} Success Response.

Code 200

Response

{
    "status": "Success",
    "data": {
        "message": "Customer Subscriptions",
        "total": 1,
        "subscriptions": [
            {
                "id": 610000,
                "name": "Microsoft 365 Business Basic",
                "azure_plan_id": null,
                "subscription_id": "38A38E69-CF31-4F08-83BF-B34DB8FD0F65",
                "customer_id": 310000,
                "product_id": "BD938F12-058F-4927-BBA3-AE36B1D2501C",
                "catalog_item_id": null,
                "order_id": "1717bd87-3f50-4ab9-b964-fae2be7ef449",
                "amount": "24",
                "instance_id": "1",
                "budget": null,
                "msrpid": null,
                "expiration_data": "2022-04-15",
                "CancellationAllowedUntil": "[]",
                "refundableQuantity": [
                    []
                ],
                "autorenew": 0,
                "billing_period": "annual",
                "billing_type": "license",
                "term": "P1Y",
                "currency": "EUR",
                "tenant_name": "customertagydes889j8.onmicrosoft.com",
                "status_id": 2,
                "created_at": "2021-03-19T04:50:52.000000Z",
                "updated_at": "2022-03-17T19:58:53.000000Z",
                "changes_on_renew": null
            }
        ]
    }
}

{danger} Error Response

Code 401

Reason Resource not found

Response

{
    "data": "Resource not found"
}