Skip to main content
DELETE
/
2025-09
/
orders
/
{order_id}
/
line_items
/
{line_item_id}
Delete a Line Item
curl --request DELETE \
  --url https://public-api.stora.co/2025-09/orders/{order_id}/line_items/{line_item_id} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://public-api.stora.co/2025-09/orders/{order_id}/line_items/{line_item_id}"

headers = {"Authorization": "Bearer <token>"}

response = requests.delete(url, headers=headers)

print(response.text)
const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};

fetch('https://public-api.stora.co/2025-09/orders/{order_id}/line_items/{line_item_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://public-api.stora.co/2025-09/orders/{order_id}/line_items/{line_item_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$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://public-api.stora.co/2025-09/orders/{order_id}/line_items/{line_item_id}"

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

req.Header.Add("Authorization", "Bearer <token>")

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.delete("https://public-api.stora.co/2025-09/orders/{order_id}/line_items/{line_item_id}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://public-api.stora.co/2025-09/orders/{order_id}/line_items/{line_item_id}")

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

request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "success": {
    "message": "Line item deleted successfully."
  },
  "meta": {
    "request_id": "01563646-58c1-4607-8fe0-cae3e92c4477",
    "curies": [
      {
        "name": "bo",
        "href": "https://app.stora.test{rel}",
        "templated": true,
        "title": "Backoffice"
      },
      {
        "name": "sf",
        "href": "https://acme.stora.test{rel}",
        "templated": true,
        "title": "Storefront"
      }
    ]
  }
}
{
"error": {
"code": "resource_not_found",
"details": [],
"links": [
{
"kind": "open_api",
"name": "OpenAPI specification",
"url": "https://docs.stora.test/2025-09/openapi.json"
},
{
"kind": "documentation",
"name": "Errors",
"url": "https://docs.stora.test/2025-09/guides/errors"
}
],
"message": "The Orders/Line Item was not found.",
"request_id": "01563646-58c1-4607-8fe0-cae3e92c4477",
"type": "invalid_request_error"
}
}
{
"error": {
"code": "conflict",
"details": [],
"links": [
{
"kind": "open_api",
"name": "OpenAPI specification",
"url": "https://docs.stora.test/2025-09/openapi.json"
},
{
"kind": "documentation",
"name": "Errors",
"url": "https://docs.stora.test/2025-09/guides/errors"
}
],
"message": "The order must be in the draft status to modify its line items. The current status is completed.",
"request_id": "01563646-58c1-4607-8fe0-cae3e92c4477",
"type": "invalid_request_error"
}
}

Authorizations

Authorization
string
header
required

Bearer Token necessary to use API

Path Parameters

order_id
string
required

The ID of the order

line_item_id
string
required

The ID of the line item

Response

line item deleted successfully

Generic Success Response

success
object
meta
object