Core Resources
Onetimes
Onetimes represent non-recurring line items on a
QUEUED Charge.#The onetime object
Attributes
- idintegerOne Time subscription id.
- address_idintegerUnique numeric identifier for the address the One Time Purchase is associated with (cannot be used with
next_charge_scheduled_at) - add_to_next_chargebooleanBoolean used to automatically add One Time Purchase to the next scheduled charge associated with the indicated address record.
- created_atstringThe time the One Time Product was first created.
- customer_idintegerUnique numeric identifier for the customer the One Time Purchase is tied to.
- next_charge_scheduled_atstringDate of the One Time Purchase execution.
- priceintegerThe price of the item before discounts, taxes, or shipping have been applied.
- product_titlestringThe name of the product in a shop’s catalog.
- propertiesarrayThe list of line item objects.
- quantityintegerThe number of items on the subscription.
- recharge_product_idintegerUnique number identifier of the product in Recharge.
- shopify_product_idintegerUnique number identifier of the product in Shopify.
- shopify_variant_idintegerUnique number identifier of the product variant in Shopify.
- skustringA unique identifier of the item in the fulfillment.
- statusstringThe status of the One Time Purchase.
- updated_atstringThe time the One Time Purchase was last updated.
- variant_titlestringThe name of the variant in a shop’s catalog.
{
"onetime": {
"id": 16909886,
"address_id": 21317826,
"created_at": "2018-11-14T11:20:05",
"customer_id": 18819267,
"next_charge_scheduled_at": "2018-12-17T00:00:00",
"price": null,
"product_title": "SuperKiwi ONETIME",
"properties": [
{
"name": "grind",
"value": "drip"
}
],
"quantity": 1,
"recharge_product_id": 518672,
"shopify_product_id": 1255175363,
"shopify_variant_id": 3844892483,
"sku": null,
"status": "ONETIME",
"updated_at": "2018-11-14T11:20:05",
"variant_title": "6oz"
}
}#Create a onetime
POST/addresses/{address_id}/onetimes
Create a new Onetime.
Scope
write_subscriptionsBody parameters
- add_to_next_chargebooleanBoolean used to automatically add One Time Purchase to the next scheduled charge associated with the indicated address record.
- This will set the charge date of a new One Time Purchase (cannot be used with
add_to_next_charge). - priceintegerThe price of the product.
- product_titlestringThe name of the product.
- propertiesstringList of properties.
- The quantity of the product.
- Unique numeric identifier of the product in Shopify.
- Unique numeric identifier of the product variant in Shopify.
curl -X POST 'https://api.rechargeapps.com/addresses/21317826/onetimes' \
-H 'Content-Type: application/json' \
-H 'X-Recharge-Access-Token: your_api_token' \
-d '{
"next_charge_scheduled_at": "2021-12-17",
"price": 9,
"product_title": "SuperKiwi ONETIME",
"properties": [
{
"name": "grind",
"value": "drip"
},
{
"name": "size",
"value": "medium"
}
],
"quantity": 1,
"shopify_variant_id": 3844892483
}'{
"onetime": {
"id": 16909886,
"address_id": 21317826,
"created_at": "2018-11-14T11:20:05",
"customer_id": 18819267,
"next_charge_scheduled_at": "2021-12-17T00:00:00",
"price": null,
"product_title": "SuperKiwi ONETIME",
"properties": [
{
"name": "grind",
"value": "drip"
}
],
"quantity": 1,
"recharge_product_id": 518672,
"shopify_product_id": 1255175363,
"shopify_variant_id": 3844892483,
"sku": null,
"status": "ONETIME",
"updated_at": "2018-11-14T11:20:05",
"variant_title": "6oz"
}
}curl 'https://api.rechargeapps.com/onetimes/16909886' \
-H 'X-Recharge-Access-Token: your_api_token'{
"onetime": {
"id": 16909886,
"address_id": 21317826,
"created_at": "2018-11-14T11:20:05",
"customer_id": 18819267,
"next_charge_scheduled_at": "2021-12-17T00:00:00",
"price": null,
"product_title": "SuperKiwi ONETIME",
"properties": [
{
"name": "grind",
"value": "drip"
},
{
"name": "size",
"value": "medium"
}
],
"quantity": 1,
"recharge_product_id": 518676,
"shopify_product_id": 1255175363,
"shopify_variant_id": 3844892483,
"sku": null,
"status": "ONETIME",
"updated_at": "2018-11-14T11:20:05",
"variant_title": "6oz"
}
}#Update a onetime
PUT/onetimes/{id}
Update an existing One Time Product.
Scope
write_subscriptionsBody parameters
- next_charge_scheduled_atbooleanThis will set the charge date of a new One Time Purchase (cannot be used with
add_to_next_charge). - priceintegerThe price of the product.
- product_titlestringThe name of the product.
- propertiesstringList of properties.
- quantityintegerThe quantity of the product.
- shopify_variant_idintegerUnique numeric identifier of the product variant in Shopify.
- skustringA unique alphanumeric identifier of the item in the fulfillment.
- variant_titlestringThe name of the product variant.
curl -X PUT 'https://api.rechargeapps.com/onetimes/16909886' \
-H 'Content-Type: application/json' \
-H 'X-Recharge-Access-Token: your_api_token' \
-d '{
"quantity": 1
}'{
"onetime": {
"id": 16909886,
"address_id": 21317826,
"created_at": "2018-11-14T11:20:05",
"customer_id": 18819267,
"next_charge_scheduled_at": "2021-12-17T00:00:00",
"price": null,
"product_title": "SuperKiwi ONETIME",
"properties": [
{
"name": "grind",
"value": "drip"
},
{
"name": "size",
"value": "medium"
}
],
"quantity": 1,
"recharge_product_id": 518676,
"shopify_product_id": 1255175363,
"shopify_variant_id": 3844892483,
"sku": null,
"status": "ONETIME",
"updated_at": "2018-11-14T11:20:05",
"variant_title": "6oz"
}
}curl -X DELETE 'https://api.rechargeapps.com/onetimes/16665185' \
-H 'X-Recharge-Access-Token: your_api_token'{}#List onetimes
GET/onetimes
Returns a list of all One Time products from store.
Scope
read_subscriptionsQuery parameters
- address_idstringReturn the onetimes linked to the given address_id.
- created_at_maxstringReturn the onetimes created before the given date.
- created_at_minstringReturn the onetimes created after the given date.
- customer_idstringReturn the onetimes linked to the given Recharge customer id.
- limitstringThe number of results. Default is 50, maximum is 250.
- The page to show. Default is 1.Page-based pagination has been deprecated but still available to use for pages up to a 100. If you need data past this point, use cursor pagination.
- shopify_customer_idstringReturn the onetimes linked to the given Shopify customer id.
- updated_at_maxstringReturn the onetimes updated before the given date.
- updated_at_minstringReturn the onetimes updated after the given date.
curl 'https://api.rechargeapps.com/onetimes?limit=3' \
-H 'X-Recharge-Access-Token: your_api_token'{
"onetimes": [
{
"id": 16909886,
"address_id": 21317826,
"created_at": "2018-11-14T11:20:05",
"customer_id": 18819267,
"next_charge_scheduled_at": "2018-12-17T00:00:00",
"price": null,
"product_title": "SuperKiwi ONETIME",
"properties": [
{
"name": "grind",
"value": "drip"
},
{
"name": "size",
"value": "medium"
}
],
"quantity": 1,
"recharge_product_id": 518676,
"shopify_product_id": 1255175363,
"shopify_variant_id": 3844892483,
"sku": null,
"status": "ONETIME",
"updated_at": "2018-11-14T11:20:05",
"variant_title": "6oz"
}
]
}