PurchaseOrder

List all purchase orders

Changed on

List all purchase orders

get/billing/v1/orders

Request

Query parameters

startDateFromnumber

Filters results to only include subscriptions that were started on or after the specified date

startDateTonumber

Filters results to only include subscriptions that were started on or before the specified date

status'INITIALIZED' | 'PENDING_USER_APPROVAL' | 'PENDING_REMOTE_CREATION' | 'PENDING_MANUAL_RECOVERY' | 'PENDING_ASYNCHRONOUS_CREATION' | 'FREE_TRIAL' | 'ACTIVE' | 'FINISHED' | 'ONE_TIME' | 'CANCELLED' | 'SUSPENDED' | 'FREE_TRIAL_EXPIRED' | 'FREE_TRIAL_CANCELLED' | 'DELETED' | 'FAILED' | 'UPCOMING' | 'PENDING_MIGRATION_ACTIVATION' | 'PENDING_DELAYED_PROVISIONING'

Filters orders with an order status

currency'USD' | 'CAD' | 'EUR' | 'JPY' | 'GBP' | 'KRW' | 'CHF' | 'SEK' | 'SGD' | 'MYR' | 'AUD' | 'MXN' | 'INR' | 'BRL' | 'DKK' | 'NZD' | 'NOK' | 'ZAR' | 'PHP' | 'CNY' | 'SAR' | 'GTQ' | 'IDR' | 'ARS' | 'COP' | 'PEN'

Filters orders by currency

type'NEW' | 'MIGRATION' | 'ADOPTION' | 'FREE_TRIAL_ACTIVATION' | 'TERMINATION_FEE' | 'END_OF_CONTRACT_MIGRATION' | 'REFUND' | 'CREDIT' | 'ONE_TIME_FEE' | 'ADDITIONAL_FEE' | 'END_OF_DISCOUNT_MIGRATION' | 'METERED_USAGE'

Filters orders by type.<br/>NEW: The first order of a subscription. The order contains flat fees (one time or recurring) for this subscription. It is active until the subscription is updated or canceled.<br/>MIGRATION: The order created after a subscription change. The order includes flat fees for both one-time and recurring editions.<br/>ADOPTION: The order created by an administrator who has taken ownership of an application from another user within the same company.<br/>FREE_TRIAL_ACTIVATION: Created when a free trial is manually upgraded to a paid subscription. Any subscription that is updated from free trial to paid automatically keeps its NEW status purchase order.<br/>TERMINATION_FEE: A subscription is canceled that had a termination fee. This purchase order represents the fees incurred as a result of the cancellation.<br/>END_OF_CONTRACT_MIGRATION: Created when a subscription update takes place as a result of a contract extension. If the contract autorenewal is set to either continue without a contract or renew the contract with the same pricing plan, then no migration occurs and the original purchase order is updated to include the new end date for the contract.<br/>REFUND: Created when a refund is performed. The refund purchase order is created for only on-platform refunds. Off-platform refunds do not generate this type of purchase order.<br/>CREDIT: Created during subscription update events. Any subscription update calculates a paid period and a credit period. The credit is then provided to the user to prorate the subscription.<br/>ONE_TIME_FEE: Created if an edition includes one-time setup fees.<br/>ADDITIONAL_FEE: Used for off-order charges. A developer change creates an off-order charge and charges their customer a custom amount outside of the normal subscription cycle.<br/>END_OF_DISCOUNT_MIGRATION: Created after a discount of limited duration expires. This purchase order is created to represent the updated costs without the discount.<br/>METERED_USAGE: A purchase order created to accumulate usage fees during a billing period. The order is only valid for the billing period but it is updated with usage lines over the course of the billing period. A metered purchase order is invoiced in arrears at the end of the billing cycle.

frequency'ONE_TIME' | 'MONTHLY' | 'QUARTERLY' | 'SIX_MONTHS' | 'YEARLY' | 'TWO_YEARS' | 'THREE_YEARS' | 'DAILY'

Filters orders by payment frequency

orderReferenceCodestring

Filters orders by order reference code

applicationIdsnumber

Filters orders by internal application ID

fromCreationDatenumber

Filters results to only include subscriptions that were created on or after the specified date

toCreationDatenumber

Filters results to only include subscriptions that were created on or before the specified date

pageinteger

First result index. Used for paging.

referenceCodestring

Code provided by resellers and Sales Reps while purchasing a subscription

sizeinteger

Number of results to fetch. Used for paging.

sortField'DATE' | 'ORDER_ID' | 'TOTAL'

The filed to be used for sorting com.appdirect.backend.api.billing.types.OrderSortWS.

sortOrder'ASC' | 'DESC'

Sort order org.springframework.data.domain.Sort.Direction.

Response

OK

_embeddedobject nullable
currencystring nullable

Currency.

endDatenumber nullable

Order end date.

endOfDiscountDatenumber nullable

Discount end date.

frequencystring nullable

Frequency.

idnumber nullable

ID.

parentSubscriptionIdnumber nullable

Parent subscription ID of an add-on subscription

serviceStartDatenumber nullable

Service start date for the order

nextBillingDatenumber nullable

Next billing date for the order

referenceCodestring nullable

Reference code

startDatenumber nullable

Order start date

statusstring nullable

Order status

totalPricenumber nullable

Total price for the order

typestring nullable

Type.

Example response

{
  "_embedded": {
    "property1": {},
    "property2": {}
  },
  "company": {
    "href": "...",
    "id": "..."
  },
  "currency": "...",
  "endDate": 12345,
  "endOfDiscountDate": 12345,
  "frequency": "...",
  "id": 12345,
  "links": [
    {
      "href": "...",
      "rel": "..."
    },
    {
      "href": "...",
      "rel": "..."
    }
  ],
  "nextBillingDate": 12345,
  "paymentPlan": {
    "href": "...",
    "id": "..."
  },
  "referenceCode": "...",
  "salesSupportUser": {
    "href": "...",
    "id": "..."
  },
  "startDate": 12345,
  "status": "...",
  "totalPrice": 12345,
  "type": "...",
  "user": {
    "href": "...",
    "id": "..."
  }
}

Changes