Customers

The Customer object represent your customer and the API allows you to create, update and retrieve your customers. You can retrieve a list of all your customers as well retrieve an individual customer.

Customer object

Create a customer

POST https://api.piriod.com/customers/

Creates a new Customer object.

Request Body

Retrieve a customer

GET https://api.piriod.com/customers/{{id}}/

Retrieves a Customer object.

Path Parameters

{
    "id": "cus_dl6PTxQnTYy5BHYskV",
    "address": "ACME ST 909A",
    "aggregations": {
        "sales": 3757.00,
        "sales_current_period": 457.00,
        "balance": 457.00
    },
    "contacts": [],
    "country": {
        "id": "US",
        "name": "Estados Unidos",
        "name_en": "United states",
        "phone_code": "+1",
        "has_regulation": false,
        "tax_percent": 10
    },
    "currency": "USD",
    "email": "hello@acmetest.com",
    "metadata": {},
    "name": "ACME TEST LLC",
    "phone": "",
    "sources": [],
    "state": {
        "id": "USAZ",
        "code": "AZ",
        "name": "Arizona"
    },
    "tax_id": "897-56-9831",
    "tax_settings": {},
    "website": "",
    "created": "2020-10-15T13:26:15.356289-03:00",
    "updated": "2020-10-15T13:26:15.356321-03:00"
}

Update a customer

PATCH https://api.piriod.com/customers/{{id}}/

Update a Customer object.

Path Parameters

Request Body

{
    "id": "cus_dl6PTxQnTYy5BHYskV",
    "address": "ACME ST 909A",
    "aggregations": {
        "sales": 3757.00,
        "sales_current_period": 457.00,
        "balance": 457.00
    },
    "contacts": [],
    "country": {
        "id": "US",
        "name": "Estados Unidos",
        "name_en": "United states",
        "phone_code": "+1",
        "has_regulation": false,
        "tax_percent": 10
    },
    "currency": "USD",
    "email": "hello@acmefinal.com",
    "metadata": {},
    "name": "ACME FINAL LLC",
    "phone": "",
    "sources": [],
    "state": {
        "id": "USAZ",
        "code": "AZ",
        "name": "Arizona"
    },
    "tax_id": "897-56-9831",
    "tax_settings": {},
    "website": "",
    "created": "2020-10-15T13:26:15.356289-03:00",
    "updated": "2020-10-15T13:26:15.356321-03:00"
}

List customers

GET https://api.piriod.com/customers/

Retrieves a list of Customer objects.

Query Parameters

{
    "count": 64,
    "next": "https://api.piriod.com/customers/?page=2&country=Estados",
    "previous": null,
    "results": [
        {
            "id": "cus_dl6PTxQnTYy5BHYskV",
            "address": "ACME ST 909A",
            "aggregations": {
                "sales": 3757.00,
                "sales_current_period": 457.00,
                "balance": 457.00
            },
            "contacts": [],
            "country": {
                "id": "US",
                "name": "Estados Unidos",
                "name_en": "United states",
                "phone_code": "+1",
                "has_regulation": false,
                "tax_percent": 10
            },
            "currency": "USD",
            "email": "hello@acmefinal.com",
            "metadata": {},
            "name": "ACME FINAL LLC",
            "phone": "",
            "sources": [],
            "state": {
                "id": "USAZ",
                "code": "AZ",
                "name": "Arizona"
            },
            "tax_id": "897-56-9831",
            "tax_settings": {},
            "website": "",
            "created": "2020-10-15T13:26:15.356289-03:00",
            "updated": "2020-10-15T13:26:15.356321-03:00"
        }
        ...
    ]
}

Available filter fields:

  • country

  • email

  • name

  • sources

  • tax_id

  • created

Last updated