Partially update a subscription

Request

Security
OAuth2(Required scopes: FullAccessMeSubscriptionAdmin)
Path
subscriptionIDstringrequired

ID of the subscription.

Bodyapplication/jsonrequired
IDstring, <= 100 characters
Example:""
Frequencyinteger, (int32)

Used to define how often to process the subscription. The subscription will process once every {Frequency} {Interval}.

Example:0
Intervalstring(SubscriptionInterval)

Used to define how often to process the subscription. The subscription will process once every {Frequency} {Interval}.

Enum:"Days""Weeks""Months"
Example:"Days"
NextOrderDatestring, (date-time)

Next order date of the subscription. The hourly process that creates subscription orders will query for subscriptions with a NextOrderDate between now and five hours ago.

Example:"2018-01-01T00:00:00-06:00"
EndDatestring, (date-time)
Example:"2018-01-01T00:00:00-06:00"
Activeboolean
Default:true
Example:false
FromCompanyIDstring

Only use when creating a subscription on behalf of another user. ID of the buyer or marketplace owner placing the order.

Example:""
FromUserIDstring

Only use when creating a subscription on behalf of a another user.

Example:""
ToCompanyIDstring

ID of the marketplace owner or supplier receiving the order created by this subscription, only writable on create.

Example:""
Paymentobject(SubscriptionPayment)
Example:
{ "Type": "PurchaseOrder", "CreditCardID": "", "SpendingAccountID": "" }
BillingAddressIDstring
Example:""
ShippingAddressIDstring
Example:""
xpobject
Example:
{}
curl -i -X PATCH \
  'https://api.ordercloud.io/v1/me/subscriptions/{subscriptionID}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "ID": "",
    "Frequency": 0,
    "Interval": "Days",
    "NextOrderDate": "2018-01-01T00:00:00-06:00",
    "LastOrderDate": "2018-01-01T00:00:00-06:00",
    "NotificationDate": "2018-01-01T00:00:00-06:00",
    "DateCreated": "2018-01-01T00:00:00-06:00",
    "EndDate": "2018-01-01T00:00:00-06:00",
    "Active": false,
    "FromCompanyID": "",
    "FromUserID": "",
    "ToCompanyID": "",
    "Payment": {
      "Type": "PurchaseOrder",
      "CreditCardID": "",
      "SpendingAccountID": ""
    },
    "BillingAddressID": "",
    "ShippingAddressID": "",
    "ProjectedSubtotal": 0,
    "xp": {}
  }'

Responses

Bodyapplication/json
IDstring, <= 100 characters
Example:""
Frequencyinteger, (int32)

Used to define how often to process the subscription. The subscription will process once every {Frequency} {Interval}.

Example:0
Intervalstring(SubscriptionInterval)

Used to define how often to process the subscription. The subscription will process once every {Frequency} {Interval}.

Enum:"Days""Weeks""Months"
Example:"Days"
NextOrderDatestring, (date-time)

Next order date of the subscription. The hourly process that creates subscription orders will query for subscriptions with a NextOrderDate between now and five hours ago.

Example:"2018-01-01T00:00:00-06:00"
LastOrderDatestring, (date-time)read-only
Example:"2018-01-01T00:00:00-06:00"
NotificationDatestring, (date-time)read-only

Date that subscription order reminder message sender will be triggered if used. Value is the result of NextOrderDate less NotificationDays on the subscription integration.

Example:"2018-01-01T00:00:00-06:00"
DateCreatedstring, (date-time)read-only
Example:"2018-01-01T00:00:00-06:00"
EndDatestring, (date-time)
Example:"2018-01-01T00:00:00-06:00"
Activeboolean
Default:true
Example:false
FromCompanyIDstring

Only use when creating a subscription on behalf of another user. ID of the buyer or marketplace owner placing the order.

Example:""
FromUserIDstring

Only use when creating a subscription on behalf of a another user.

Example:""
ToCompanyIDstring

ID of the marketplace owner or supplier receiving the order created by this subscription, only writable on create.

Example:""
Paymentobject(SubscriptionPayment)
Example:
{ "Type": "PurchaseOrder", "CreditCardID": "", "SpendingAccountID": "" }
BillingAddressIDstring
Example:""
ShippingAddressIDstring
Example:""
ProjectedSubtotalnumber, (float)read-only

Tentative subtotal of next subscription order. Based on current known pricing; avoid if product or pricing is provided by an external integration.

Example:0
xpobject
Example:
{}
Response
{ "ID": "", "Frequency": 0, "Interval": "Days", "NextOrderDate": "2018-01-01T00:00:00-06:00", "LastOrderDate": "2018-01-01T00:00:00-06:00", "NotificationDate": "2018-01-01T00:00:00-06:00", "DateCreated": "2018-01-01T00:00:00-06:00", "EndDate": "2018-01-01T00:00:00-06:00", "Active": false, "FromCompanyID": "", "FromUserID": "", "ToCompanyID": "", "Payment": { "Type": "PurchaseOrder", "CreditCardID": "", "SpendingAccountID": "" }, "BillingAddressID": "", "ShippingAddressID": "", "ProjectedSubtotal": 0, "xp": {} }