Creating an Order

Step-by-step guide to creating an order through the Presscart API, from browsing products to checkout.

This guide walks through the complete flow for placing an order via the Presscart API.

Prerequisites

Your API token needs the following scopes:

  • products.read -- to browse the marketplace
  • profiles.lists -- to look up your profile ID
  • orders.create -- to place the order

Step 1: Get your profile ID

List the profiles on your team to find the profile you want to place the order for.

curl "https://api.presscart.com/teams/YOUR_TEAM_ID/profiles" \
  -H "Authorization: Bearer $PRESSCART_API_TOKEN"

Note the id of the profile you want to use.

Step 2: Browse the marketplace

Search for products using the listings endpoint.

curl "https://api.presscart.com/products/listings?limit=20&filters[is_do_follow]=true" \
  -H "Authorization: Bearer $PRESSCART_API_TOKEN"

You can filter by channel type, placement type, price range, Domain Authority, Domain Rating, turnaround time, tags, location, and more. See the Products API reference for all available filters.

Step 3: Review product details

Once you find a product you are interested in, retrieve its full details.

curl "https://api.presscart.com/products/33333333-3333-3333-3333-333333333333" \
  -H "Authorization: Bearer $PRESSCART_API_TOKEN"

Step 4: Place the order

Submit a checkout request with your profile ID and line items.

curl -X POST "https://api.presscart.com/orders/checkout" \
  -H "Authorization: Bearer $PRESSCART_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "profile_id": "22222222-2222-2222-2222-222222222222",
    "line_items": [
      {
        "product_id": "33333333-3333-3333-3333-333333333333",
        "quantity": 1,
        "is_add_on": false,
        "linked_order_line_item_id": null
      }
    ],
    "discount": 0
  }'

Line item fields

FieldTypeDescription
product_idstringUUID of the product to order
quantitynumberHow many units to order
is_add_onbooleanSet to true if this is an add-on to another item
linked_order_line_item_idstring | nullFor add-ons, the UUID of the parent line item. null for primary items

Adding add-ons

To include add-on products, add a second line item with is_add_on: true and reference the parent item:

{
  "profile_id": "22222222-2222-2222-2222-222222222222",
  "line_items": [
    {
      "product_id": "33333333-3333-3333-3333-333333333333",
      "quantity": 1,
      "is_add_on": false,
      "linked_order_line_item_id": null
    },
    {
      "product_id": "77777777-7777-7777-7777-777777777777",
      "quantity": 1,
      "is_add_on": true,
      "linked_order_line_item_id": null
    }
  ],
  "discount": 0
}

The response includes a checkout_link field — a URL you can share with the customer so they can complete payment in their browser.

Step 6: Verify the order

Retrieve the order to confirm it was created successfully.

curl "https://api.presscart.com/orders/ORDER_ID" \
  -H "Authorization: Bearer $PRESSCART_API_TOKEN"

Next steps

On this page