Reputation: 2292
I am looking for a Squarespace API which i can use to place order. I searched on google and found a Squarespace documentation that mentions Orders API ( https://support.squarespace.com/hc/en-us/articles/236297987-Squarespace-API-keys ) but it is not helpful as it does not mention any API endpoint.
Commerce API Endpoint for order fulfilment is available but i was not able to find one for placing an order.
Any help in this direction will be highly appreciated.
Upvotes: 0
Views: 1318
Reputation: 3707
Using the Squarespace developer docs as a reference, the endpoints are as follows:
All API endpoints are served from
https://api.squarespace.com/<version>
For example:
curl "https://api.squarespace.com/1.0/commerce/orders/56f1806d7b863796cbc2ee81" -H "Authorization: Bearer YOUR_SECRET_API_KEY"
At time of writing, it is not currently possible to place orders using the Squarespace Commerce API. But you can set stock levels now, which means that if you can work with the Stripe API yourself and facilitate the purchase, you can then update stock levels within Squarespace.
With the Squarespace Commerce API, you can build applications that manage data from your Squarespace store. HTTP endpoints are provided which allow you to:
- Retrieve orders
- Update orders with fulfillment information
- Retrieve product variant stock levels
- Update stock levels using incremental and decremental adjustments
- Set finite stock levels for product variants
- Mark product variants as having unlimited stock
Note that this feature requries a rather expensive "Commerce Advanced" plan.
Upvotes: 1