Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/hack4impact-umd/breastfeeding-center-gw/llms.txt

Use this file to discover all available pages before exploring further.

Overview

These endpoints proxy data from the Squarespace Commerce API. Order data is fetched live from Squarespace on each request. Squarespace client data is also synced automatically into Firestore by the squarespaceSync scheduled function, which runs every 6 hours over a rolling 1-week window. All endpoints require a valid Firebase Auth ID token. Base URL: https://us-east4-breastfeeding-center-gw.cloudfunctions.net/api

GET /squarespace/orders

Returns all Squarespace commerce orders placed within a date range. Auth required: Yes

Query parameters

startDate
string
required
ISO 8601 start of the order window (inclusive). Example: 2024-01-01T00:00:00Z.
endDate
string
required
ISO 8601 end of the order window (inclusive). Example: 2024-02-01T00:00:00Z.

Example

curl "https://us-east4-breastfeeding-center-gw.cloudfunctions.net/api/squarespace/orders?startDate=2024-01-01T00:00:00Z&endDate=2024-02-01T00:00:00Z" \
  -H "Authorization: Bearer <id_token>"

Response

Returns a JSON array of Squarespace order objects.

Error codes

StatusReason
400startDate or endDate is missing, or the Squarespace API request failed
403Missing or invalid auth token

GET /squarespace/orders/customer/:customerId

Returns all Squarespace orders placed by a specific customer, identified by their Squarespace customer ID. Auth required: Yes

Path parameters

customerId
string
required
The Squarespace customer ID. This corresponds to the squarespaceCustomerId field on a Client record in Firestore.

Example

curl "https://us-east4-breastfeeding-center-gw.cloudfunctions.net/api/squarespace/orders/customer/sq-cust-abc123" \
  -H "Authorization: Bearer <id_token>"

Response

Returns a JSON array of Squarespace order objects for the specified customer.

Error codes

StatusReason
400customerId is missing, or the Squarespace API request failed
403Missing or invalid auth token

GET /squarespace/profile

Returns the Squarespace customer profile for a given email address. Auth required: Yes

Query parameters

email
string
required
The email address of the customer to look up.

Example

curl "https://us-east4-breastfeeding-center-gw.cloudfunctions.net/api/squarespace/profile?email=jane.doe%40example.com" \
  -H "Authorization: Bearer <id_token>"

Response

Returns the Squarespace customer profile object for the given email.

Error codes

StatusReason
400email is missing, or the Squarespace API request failed
403Missing or invalid auth token

Build docs developers (and LLMs) love