Skip to main content
DELETE
/
api
/
external
/
v2
/
subscription-contract-one-offs-by-contractId-and-billing-attempt-id
Remove one-time product from upcoming order
curl --request DELETE \
  --url https://membership-admin.appstle.com/api/external/v2/subscription-contract-one-offs-by-contractId-and-billing-attempt-id
import requests

url = "https://membership-admin.appstle.com/api/external/v2/subscription-contract-one-offs-by-contractId-and-billing-attempt-id"

response = requests.delete(url)

print(response.text)
const options = {method: 'DELETE'};

fetch('https://membership-admin.appstle.com/api/external/v2/subscription-contract-one-offs-by-contractId-and-billing-attempt-id', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
const url = 'https://membership-admin.appstle.com/api/external/v2/subscription-contract-one-offs-by-contractId-and-billing-attempt-id';
const options = {method: 'DELETE'};

fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://membership-admin.appstle.com/api/external/v2/subscription-contract-one-offs-by-contractId-and-billing-attempt-id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://membership-admin.appstle.com/api/external/v2/subscription-contract-one-offs-by-contractId-and-billing-attempt-id"

req, _ := http.NewRequest("DELETE", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
require 'uri'
require 'net/http'

url = URI("https://membership-admin.appstle.com/api/external/v2/subscription-contract-one-offs-by-contractId-and-billing-attempt-id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
[
  {
    "shop": "my-store.myshopify.com",
    "billingAttemptId": 123,
    "id": 789,
    "subscriptionContractId": 123,
    "variantHandle": "<string>",
    "variantId": 123
  }
]
{
"detail": "One-off item not found or already processed",
"errorKey": "not_found",
"status": 400,
"title": "Bad Request"
}
[
{
"shop": "my-store.myshopify.com",
"billingAttemptId": 123,
"id": 789,
"subscriptionContractId": 123,
"variantHandle": "<string>",
"variantId": 123
}
]
[
{
"shop": "my-store.myshopify.com",
"billingAttemptId": 123,
"id": 789,
"subscriptionContractId": 123,
"variantHandle": "<string>",
"variantId": 123
}
]
[
{
"shop": "my-store.myshopify.com",
"billingAttemptId": 123,
"id": 789,
"subscriptionContractId": 123,
"variantHandle": "<string>",
"variantId": 123
}
]

Headers

X-API-Key
string

Query Parameters

api_key
string

API Key (Deprecated - Use Header X-API-Key instead)

contractId
integer<int64>
required

Subscription contract ID

billingAttemptId
integer<int64>
required

Billing attempt ID to remove the item from

variantId
integer<int64>
required

Product variant ID to remove

Response

One-off product successfully removed, returns updated list of remaining one-offs

shop
string
required

Shop domain identifier

Example:

"my-store.myshopify.com"

billingAttemptId
integer<int64>

Associated billing attempt ID

id
integer<int64>

Unique identifier of the one-off item

Example:

789

subscriptionContractId
integer<int64>

Associated subscription contract ID

variantHandle
string

Product variant handle for the one-off item

variantId
integer<int64>

Shopify product variant ID of the one-off item