Add an order note. Only possible if the order has status=OPEN and the maximum number of 100 notes is not reached.
| Status | Description |
|---|---|
| 200 | The request is successfully accepted. |
| 400 | Invalid request syntax |
curl -X POST 'https://order.api.myparcel.nl/add-note' \
-H 'Authorization: bearer <token>' \
-H 'User-Agent: my-integration/1.0' \
-H 'Content-Type: application/json' \
-d '[
{
"id": "00000000-0000-0000-0000-000000000000",
"text": "string"
}
]'<?php
$ch = curl_init("https://order.api.myparcel.nl/add-note");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => json_encode([{"id": "00000000-0000-0000-0000-000000000000", "text": "string"}]),
CURLOPT_HTTPHEADER => [
'Authorization: bearer <token>',
'User-Agent: my-integration/1.0',
'Content-Type: application/json',
],
]);
$response = json_decode(curl_exec($ch), true);const response = await fetch("https://order.api.myparcel.nl/add-note", {
method: 'POST',
headers: {
Authorization: 'bearer <token>',
'User-Agent': 'my-integration/1.0',
'Content-Type': 'application/json',
},
body: JSON.stringify([
{
"id": "00000000-0000-0000-0000-000000000000",
"text": "string"
}
]),
});
const data = await response.json();import requests
headers = {"Authorization": "bearer <token>", "User-Agent": "my-integration/1.0"}
payload = [
{
"id": "00000000-0000-0000-0000-000000000000",
"text": "string"
}
]
response = requests.post("https://order.api.myparcel.nl/add-note", json=payload, headers=headers)
data = response.json()require 'net/http'
require 'json'
require 'uri'
uri = URI('https://order.api.myparcel.nl/add-note')
req = Net::HTTP::Post.new(uri)
req['Authorization'] = 'bearer <token>'
req['User-Agent'] = 'my-integration/1.0'
req['Content-Type'] = 'application/json'
req.body = "[{\"id\": \"00000000-0000-0000-0000-000000000000\", \"text\": \"string\"}]"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
payload := []byte(`[{"id": "00000000-0000-0000-0000-000000000000", "text": "string"}]`)
req, _ := http.NewRequest("POST", "https://order.api.myparcel.nl/add-note", bytes.NewBuffer(payload))
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "bearer <token>")
req.Header.Set("User-Agent", "my-integration/1.0")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest req = HttpRequest.newBuilder()
.uri(URI.create("https://order.api.myparcel.nl/add-note"))
.header("Authorization", "bearer <token>")
.header("User-Agent", "my-integration/1.0")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString("[{\"id\": \"00000000-0000-0000-0000-000000000000\", \"text\": \"string\"}]"))
.build();
HttpResponse<String> res = client.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println(res.body());
}
}using System.Net.Http;
using System.Text;
var client = new HttpClient();
var req = new HttpRequestMessage(HttpMethod.Post, "https://order.api.myparcel.nl/add-note");
req.Headers.Add("Authorization", "bearer <token>");
req.Headers.Add("User-Agent", "my-integration/1.0");
req.Content = new StringContent(@"[{""id"": ""00000000-0000-0000-0000-000000000000"", ""text"": ""string""}]", Encoding.UTF8, "application/json");
var response = await client.SendAsync(req);
var data = await response.Content.ReadAsStringAsync();[]