Register an item with KRA
curl --request POST \
--url https://sync2books-compliance-api.apps.kintro.money/v1/items/{id}/register \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{}'import requests
url = "https://sync2books-compliance-api.apps.kintro.money/v1/items/{id}/register"
payload = {}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://sync2books-compliance-api.apps.kintro.money/v1/items/{id}/register', 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://sync2books-compliance-api.apps.kintro.money/v1/items/{id}/register",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sync2books-compliance-api.apps.kintro.money/v1/items/{id}/register"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sync2books-compliance-api.apps.kintro.money/v1/items/{id}/register")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sync2books-compliance-api.apps.kintro.money/v1/items/{id}/register")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"data": {
"item": {
"id": "itm_example_1",
"externalId": "SKU-1042",
"name": "500ml Cooking Oil",
"sku": "COOK-OIL-500",
"taxCategory": "VAT_STANDARD",
"taxTypeCode": "B",
"productTypeCode": "2",
"classificationCode": "50150000",
"unitCode": "U",
"packagingUnitCode": "NT",
"unitPrice": 3500,
"stockTracked": true,
"registrationStatus": "PENDING",
"needs": {
"productType": false,
"classificationMapping": false
}
}
}
}Items
Register an item with KRA
Registers the item with KRA so it can be sold. The body is optional. If KRA rejects the item, or it is missing something, the response is a 422 that includes the item so you can see needs and registrationStatus.
Required scope: catalog:write.
POST
/
v1
/
items
/
{id}
/
register
Register an item with KRA
curl --request POST \
--url https://sync2books-compliance-api.apps.kintro.money/v1/items/{id}/register \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{}'import requests
url = "https://sync2books-compliance-api.apps.kintro.money/v1/items/{id}/register"
payload = {}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://sync2books-compliance-api.apps.kintro.money/v1/items/{id}/register', 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://sync2books-compliance-api.apps.kintro.money/v1/items/{id}/register",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sync2books-compliance-api.apps.kintro.money/v1/items/{id}/register"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sync2books-compliance-api.apps.kintro.money/v1/items/{id}/register")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sync2books-compliance-api.apps.kintro.money/v1/items/{id}/register")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"data": {
"item": {
"id": "itm_example_1",
"externalId": "SKU-1042",
"name": "500ml Cooking Oil",
"sku": "COOK-OIL-500",
"taxCategory": "VAT_STANDARD",
"taxTypeCode": "B",
"productTypeCode": "2",
"classificationCode": "50150000",
"unitCode": "U",
"packagingUnitCode": "NT",
"unitPrice": 3500,
"stockTracked": true,
"registrationStatus": "PENDING",
"needs": {
"productType": false,
"classificationMapping": false
}
}
}
}Authorizations
ApiKeyAuthBearerAuth
Your API key, for example cmp_sk_test_xxxxxxxxxxxxxxxxxxxxxxxx. Create one on the Integrations page of the compliance dashboard.
Path Parameters
The item id.
Body
application/json
The branch to register the item for. Accepts the branch id or its kraBhfId. Defaults to the business's first branch.
Set true to register again an item KRA already has.
The business to act for. Required for organisation-wide keys; omit it for a business-bound key. List the ids you can use with GET /v1/businesses.
Response
The item, now REGISTERED.
Show child attributes
Show child attributes