Get an order after ordering
curl --request GET \
--url https://b.anny.co/api/v1/orders/{order_number}import requests
url = "https://b.anny.co/api/v1/orders/{order_number}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://b.anny.co/api/v1/orders/{order_number}', 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://b.anny.co/api/v1/orders/{order_number}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://b.anny.co/api/v1/orders/{order_number}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://b.anny.co/api/v1/orders/{order_number}")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.anny.co/api/v1/orders/{order_number}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"type": "orders",
"id": "2008375",
"attributes": {
"number": "BO85985688",
"currency": "EUR",
"total": 249,
"net_amount": 209.24,
"tax_amount": 39.76,
"discount_amount": 0,
"status": "open",
"access_token": "tQZT6eecWtCcpBRotLiuDhedMc04Uz",
"expires_at": null,
"created_at": "2021-09-24T09:45:37+00:00",
"updated_at": "2021-09-24T09:46:09+00:00"
},
"links": {
"self": "https://b.anny.co/api/v1/orders/2008375"
},
"meta": {
"download_url": "https://b.anny.co/downloads/order-confirmation/2008375?access_token=tQZT6eecWtCcpBRotLiuDhedMc04Uz",
"voucher_code": null,
"is_base_order": false,
"payment_flow": "pay-offline"
}
}
}Orders & Checkout
Get an order after ordering
Auth: optional. This endpoint allows a customer to access an order via the order number after placing it. This can be authenticated either anonymously via the order access_token or via customer login.
GET
/
api
/
v1
/
orders
/
{order_number}
Get an order after ordering
curl --request GET \
--url https://b.anny.co/api/v1/orders/{order_number}import requests
url = "https://b.anny.co/api/v1/orders/{order_number}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://b.anny.co/api/v1/orders/{order_number}', 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://b.anny.co/api/v1/orders/{order_number}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://b.anny.co/api/v1/orders/{order_number}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://b.anny.co/api/v1/orders/{order_number}")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.anny.co/api/v1/orders/{order_number}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"type": "orders",
"id": "2008375",
"attributes": {
"number": "BO85985688",
"currency": "EUR",
"total": 249,
"net_amount": 209.24,
"tax_amount": 39.76,
"discount_amount": 0,
"status": "open",
"access_token": "tQZT6eecWtCcpBRotLiuDhedMc04Uz",
"expires_at": null,
"created_at": "2021-09-24T09:45:37+00:00",
"updated_at": "2021-09-24T09:46:09+00:00"
},
"links": {
"self": "https://b.anny.co/api/v1/orders/2008375"
},
"meta": {
"download_url": "https://b.anny.co/downloads/order-confirmation/2008375?access_token=tQZT6eecWtCcpBRotLiuDhedMc04Uz",
"voucher_code": null,
"is_base_order": false,
"payment_flow": "pay-offline"
}
}
}Pfadparameter
number (not the id!) of the order
Abfrageparameter
Access token to access an order anonymously
Verfügbare Optionen:
bookings, bookings.booking_add_ons.add_on, bookings.resource, bookings.resource.parent, bookings.resource.parent.cover_image, bookings.resource.settings, bookings.service, bookings.service.add_ons, bookings.sub_bookings.resource, bookings.sub_bookings.service, bookings.resource.cover_image, bookings.cancellation_policy, customer, customer.address, voucher, organization, organization.logo_image, organization.legal_documents, invoice, invoice.items, invoice_history, invoice_history.items, sub_orders, sub_orders.bookings, last_payment, last_payment.method, sub_orders, sub_orders.bookings, sub_orders.organization, sub_orders.organization.legal_documents Antwort
200 - application/vnd.api+json
OK
An order groups one or more bookings into a single transaction with payment and invoicing.
Show child attributes
Show child attributes