End point

GET https://[API-BASE-URL]/v2/sites/[SITE_ID]/export/product-orders

Description

Returns a list of ecommerce product orders with product information and purchase information for products purchased during registration checkout or as standalone products. This API also returns team, program, and player information for products purchased during registration checkout. Since ecommerce products can be purchased during registration checkout or as a standalone product in your storefront, some fields will be empty or null if it was purchased as a standalone product.

Parameters

Only the first 1000 results are returned at a time. Because of this, it's important to use the last-updated and last-id parameters to ensure that you get all results. We recommend starting with both values equalling 0, and then using the values from the last returned result in subsequent calls.

The program-id parameter, which is optional, affects whether you see purchases made in the registration flow or standalone storefront purchases. If you’d like to only see storefront purchases, program-id = 0 . If you’d like to only see purchases made in a specific program’s registration flow, set program-id equal to the ID of the program. If you’d like to only see purchases made from any registration flow, do not include program-id.

The status parameter, which is optional, affects which products you’d like to see based on which status. If you pass in Open_Paid, you’ll only see product purchases whose status are “Open_Paid”. The other options are Open_New , Cancelled, and Closed.

Parameters

Sample 1 (for reg flow)

GET https://public.leagueapps.io/v2/sites/43590/export/product_orders

last-updated = 0

last-id = 0

[
	{
        "productOrderId": 1951026,
        "lastUpdated": 1675800621000,
        "productName": "Home Uniform",
        "productId": "92031",
        "productSku": "5028",
        "salesTax": 0.0,
        "orderTotal": 10.00,
        "unitPrice": 10.0,
        "quantity": 1,
        "context": "REGFLOW",
        "shippingRequired": false,
        "address1": "PO Box 4010 ",
        "address2": "Door 2",
        "city": "Newark",
        "state": "NJ",
        "zipcode": "12203",
        "status": "OPEN_PAID",
        "orderDate": 1675800594000,
        "accountingCode1": "Co-Ed",
        "accountingCode2": "Uniform Income",
        "customPropertyValues": [
            {
                "Name for the back?": "Bee"
            },
						{
                "Size?": "Small"
            },
        ],
        "userId": 25386415,
        "firstName": "Ali",
        "lastName": "Bee",
        "registrationId": 60916446,
        "registeredUserId": 25830594,
        "registeredFirstName": "John",
        "registeredLastName": "Bee",
        "programId": 2912535,
        "programName": "Baseball 16U",
        "masterProgramId": 23513621,
        "masterProgramName": "Baseball 2022",
        "teamId": 245231532,
        "teamName": "Gold Team"
    }
]

Sample 2 (for standalone)

GET https://public.leagueapps.io/v2/sites/43590/export/product_orders

last-updated = 0

last-id = 0

program-id = 0

[
    {
        "productOrderId": 1951023,
        "lastUpdated": 1675800543000,
        "productName": "Tennis Socks",
        "productId": "92034",
        "productSku": "42951023",
        "salesTax": 0.62,
        "orderTotal": 12.00,
        "unitPrice": 12.0,
        "quantity": 1,
        "context": "STANDALONE",
        "shippingRequired": false,
        "address1": "PO Box 4010 ",
        "address2": "Door 2",
        "city": "Newark",
        "state": "NJ",
        "zipcode": "12203",
        "status": "OPEN_PAID",
        "orderDate": 1675800531000,
        "accountingCode1": "Tennis",
        "accountingCode2": "Registrations:Clubs",
        "customPropertyValues": [
            {
                "Size?": "Medium"
            }
        ],
        "userId": 25386415,
        "firstName": "Ali",
        "lastName": "Bee",
    }
]

Data dictionary

Transactions data dictionary