Lodol Docs

Square

API actions for the Square integration.

Square

Manage Square customers, catalog, orders, and payment links via OAuth.


Create customer

Create a Square customer profile.

Parameters

ParameterTypeRequiredDescription
given_namestringYesCustomer first name.
family_namestringYesCustomer last name.
email_addressstringNoCustomer email address.
phone_numberstringNoCustomer phone number.

Response

{
  "customer_id": "cust_123"
}

Create a Square payment link for checkout.

Parameters

ParameterTypeRequiredDescription
location_idstringNoSquare location ID.
line_itemsarrayYesLine items for checkout.
descriptionstringNoCheckout description.

Response

{
  "order_id": "order_123",
  "url": "https://square.link/u/example"
}

List catalog items

List Square catalog items.

Parameters

ParameterTypeRequiredDescription
typesarrayNoCatalog object types to include.
limitnumberNoMaximum number of catalog items.

Response

{
  "items": [
    {
      "id": "item_123",
      "name": "Coffee",
      "type": "ITEM"
    }
  ]
}

List locations

List Square business locations.

Response

{
  "locations": [
    {
      "id": "location_123",
      "name": "Downtown Store",
      "status": "ACTIVE"
    }
  ]
}

Retrieve order

Retrieve a Square order by ID.

Parameters

ParameterTypeRequiredDescription
order_idstringYesSquare order ID.

Response

{
  "order": {
    "id": "order_123",
    "state": "COMPLETED",
    "total_money": {
      "amount": 2500,
      "currency": "USD"
    }
  }
}

Search customers

Search Square customers by query.

Parameters

ParameterTypeRequiredDescription
querystringNoSearch query text.
limitnumberNoMaximum number of customers to return.

Response

{
  "customers": [
    {
      "family_name": "Doe",
      "given_name": "Jane",
      "id": "cust_123"
    }
  ]
}

Search orders

Search Square orders.

Parameters

ParameterTypeRequiredDescription
location_idsarrayNoLocation IDs to search.
limitnumberNoMaximum number of orders.

Response

{
  "orders": [
    {
      "id": "order_123",
      "state": "COMPLETED",
      "total_money": {
        "amount": 2500,
        "currency": "USD"
      }
    }
  ]
}

On this page