Sales APIs

API Endpoint

Resource Group

Fetch Sales

GET /api/sales?filter=filters&page=page
Requestsexample 1example 2example 3
Headers
Content-Type: application/json
x_api_token: token
Responses200
Headers
Content-Type: application/json
Body
{
      "data": [
          {
              "id": "464",
              "type": "sales",
              "attributes": {
                  "name_on_order": "Tom Bruce",
                  "order_email": "tombruce@example.org",
                  "sale_date": "2024-05-28T15:20:12-04:00",
                  "order_type": "Standard",
                  "order_status": "Completed",
                  "payment_method_name": "Credit Card",
                  "capture_method": "Online\/Phone",
                  "confirmation_number": "1YH788DR464",
                  "delivery_type": "Print At Home",
                  "sale_tag": "",
                  "opt_out_status": "Opted In",
                  "seller_id": 464,
                  "seller_name": "disney inc.",
                  "coupon_names": "",
                  "total_cost": {
                      "amount": 17900,
                      "currency": "USD",
                      "symbol": "$"
                  },
                  "total_coupon_discounts": {
                      "amount": 0,
                      "currency": "USD",
                      "symbol": "$"
                  },
                  "donation_amount": {
                      "amount": 0,
                      "currency": "USD",
                      "symbol": "$"
                  },
                  "total_paid": {
                      "amount": 17900,
                      "currency": "USD",
                      "symbol": "$"
                  },
                  "member": {
                      "id": "463",
                      "type": "member",
                      "attributes": {
                          "first_name": "Tom",
                          "last_name": "Bruce",
                          "phone": null,
                          "email": "tombruce@example.org",
                          "address": "474 Champlin Point Suite 055",
                          "address2": null,
                          "city": "Terrychester",
                          "state": "NV",
                          "zip": "90773",
                          "country": "United States",
                          "created_new_account": null
                      }
                  },
                  "tickets": [
                      {
                          "id": "695",
                          "type": "tickets",
                          "attributes": {
                              "event_id": 241,
                              "event_name": "happy weekedn party 2024",
                              "event_start": "2024-11-21T05:58:45-05:00",
                              "purchase_for": null,
                              "price_level_id": 241,
                              "price_level_name": "Vip Client",
                              "ticket_status": "Live",
                              "seat_section": "vip_6",
                              "seat_row": "A",
                              "seat_seat": 16,
                              "bundle_name": "",
                              "venue_id": 241,
                              "venue_name": "Chelsieland",
                              "cost": {
                                  "amount": 83509,
                                  "currency": "USD",
                                  "symbol": "$"
                              },
                              "transfer_status": "Not Transferred"
                          }
                      },
                      {
                          "id": "696",
                          "type": "tickets",
                          "attributes": {
                              "event_id": 241,
                              "event_name": "eoswbzeprqeycid",
                              "event_start": "2031-11-21T05:58:45-05:00",
                              "purchase_for": null,
                              "price_level_id": 241,
                              "price_level_name": "Vip Client",
                              "ticket_status": "Live",
                              "seat_section": "vip_6",
                              "seat_row": "A",
                              "seat_seat": 18,
                              "bundle_name": "",
                              "venue_id": 241,
                              "venue_name": "Chelsieland",
                              "cost": {
                                  "amount": 83509,
                                  "currency": "USD",
                                  "symbol": "$"
                              },
                              "transfer_status": "Not Transferred"
                          }
                      }
                  ],
                  "products": [
                      {
                          "id": "142",
                          "type": "product_sales",
                          "attributes": {
                              "product_id": "150",
                              "display_name": "disney badge",
                              "product_name": "disney badge",
                              "event_id": "241",
                              "event_name": "eoswbzeprqeycid",
                              "bundle_name": "",
                              "cost": {
                                  "amount": 200,
                                  "currency": "USD",
                                  "symbol": "$"
                              }
                          }
                      }
                  ],
                  "answers": [
                      {
                          "id": "271",
                          "type": "answers",
                          "attributes": {
                              "question_id": 288,
                              "question_name": "What kind of music do you like?",
                              "answer": "Classic",
                              "resource_type": "event",
                              "resource_id": 241
                          }
                      },
                      {
                          "id": "272",
                          "type": "answers",
                          "attributes": {
                              "question_id": 289,
                              "question_name": "what is your favorite sports?",
                              "answer": "Basketball",
                              "resource_type": "event",
                              "resource_id": 241
                          }
                      }
                  ]
              },
              "relationships": [],
              "dependents": []
          },
          {
              "id": "465",
              "type": "sales",
              "attributes": {
                  "name_on_order": "Dagmar Kuhn",
                  "order_email": "lschiller@example.com",
                  "sale_date": "2024-05-28T15:20:12-04:00",
                  "order_type": "Standard",
                  "order_status": "Completed",
                  "payment_method_name": "Credit Card",
                  "capture_method": "Online\/Phone",
                  "confirmation_number": "RD7U6T1T465",
                  "delivery_type": "Print At Home",
                  "sale_tag": "",
                  "opt_out_status": "Opted In",
                  "seller_id": 465,
                  "seller_name": "Yost, Schulist and Ernser",
                  "coupon_names": "",
                  "total_cost": {
                      "amount": 89455,
                      "currency": "USD",
                      "symbol": "$"
                  },
                  "total_coupon_discounts": {
                      "amount": 0,
                      "currency": "USD",
                      "symbol": "$"
                  },
                  "donation_amount": {
                      "amount": 0,
                      "currency": "USD",
                      "symbol": "$"
                  },
                  "total_paid": {
                      "amount": 89455,
                      "currency": "USD",
                      "symbol": "$"
                  },
                  "member": {
                      "id": "464",
                      "type": "member",
                      "attributes": {
                          "first_name": "Dagmar",
                          "last_name": "Kuhn",
                          "phone": null,
                          "email": "carli.howe@example.org",
                          "address": "8508 Hoppe Station Suite 824",
                          "address2": "Suite 760",
                          "city": "Metaburgh",
                          "state": "MA",
                          "zip": "38134",
                          "country": "United States",
                          "created_new_account": null
                      }
                  },
                  "tickets": [
                      {
                          "id": "697",
                          "type": "tickets",
                          "attributes": {
                              "event_id": 241,
                              "event_name": "eoswbzeprqeycid",
                              "event_start": "2031-11-21T05:58:45-05:00",
                              "purchase_for": null,
                              "price_level_id": 241,
                              "price_level_name": "productize global applications",
                              "ticket_status": "Live",
                              "seat_section": null,
                              "seat_row": null,
                              "seat_seat": null,
                              "bundle_name": "",
                              "venue_id": 241,
                              "venue_name": "Chelsieland",
                              "cost": {
                                  "amount": 83509,
                                  "currency": "USD",
                                  "symbol": "$"
                              },
                              "transfer_status": "Not Transferred"
                          }
                      }
                  ],
                  "products": [],
                  "answers": []
              },
              "relationships": [],
              "dependents": []
          }
      ],
      "page": {
          "total_count": 2,
          "total_pages": 1,
          "curent_page": 1,
          "per_page": 100,
          // large sales will be here:
          "filtered": {
            "123456789": "/sales/123456789",
            "987654321": "/sales/987654321",
            "159263487": "/sales/159263487"
          }
      }
  }
Headers
Content-Type: application/json
x_api_token: bad_token
Responses401
Headers
Content-Type: application/json
Body
{
  "errors": [
    {
      "id": "ZlZKhRv3tCrYeeA",
      "status": 401,
      "detail": "Unauthenticated user"
    }
  ]
}
Headers
Content-Type: application/json
x_api_token: token
Responses400
Headers
Content-Type: application/json
Body
{
  "errors": [
    {
      "id": "ZlZKhRv3tCrYeeA",
      "status": 400,
      "detail": "Require Filter [sale_date] or [start_date]"
    }
  ]
}

Fetch Sales
GET/api/sales?filter=filters&page=page

IMPORTANT NOTE: If a sale is too big to be displayed, it will not make it in the list. In the page section of the response, you will find a filtered entry containing the list of sales IDs and the respective endpoint to fetch the data.

Request Attributes

Property Type Required Notes
filter string always e.g. /api/sales?filter=sale_date=2024-05-15,seller_id=67
filters[sale_date] date always unless start_date is set This filter must be set if start_date is not set FORMAT Y-m-d, e.g. 2024-05-28
filters[start_date] date always unless sale_date is set This filter must be set if sale_date is not set. If no end_date is set a maximum of 366 days will be pulled stating at the start_date FORMAT Y-m-d, e.g. 2024-05-28
filters[end_date] date optional If not set and start_date is set, a maximum of 366 days from start_date will be pulled FORMAT Y-m-d, e.g. 2024-06-28
filters[seller_id] integer optional seller_id is required when current user is a partner level user
filters[event_id] integer optional filter sales belog to the event
filters[ticket_status] integer optional filter tickets of the sale, 1 live, 2 cancelled, all tickets if not present
filters[opt_out_status] integer optional filter sales of member opt_out_status, 1 Opted Out, 0 Opted In, all sales if not present
filters[question_name] string optional filter questions of sales, Cannot contain commas ,, and please encode the question name, e.g.your name? should be your%20name%3F
page integer optional Defaults to 1 if not present


Generated by aglio on 14 Feb 2025