KYC documents
Update document detail
PUT
/
customers
/
{customer_id}
/
documents
/
{document_id}
Update document detail
curl --request PUT \
--url https://staging.api.commercengine.io/api/v1/{store_id}/storefront/customers/{customer_id}/documents/{document_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'modified_reason=<string>' \
--data 'document_number=<string>' \
--data 'note=<string>' \
--data 'document_type_id=<string>'import requests
url = "https://staging.api.commercengine.io/api/v1/{store_id}/storefront/customers/{customer_id}/documents/{document_id}"
payload = {
"modified_reason": "<string>",
"document_number": "<string>",
"note": "<string>",
"document_type_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.put(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({
modified_reason: '<string>',
document_number: '<string>',
note: '<string>',
document_type_id: '<string>'
})
};
fetch('https://staging.api.commercengine.io/api/v1/{store_id}/storefront/customers/{customer_id}/documents/{document_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://staging.api.commercengine.io/api/v1/{store_id}/storefront/customers/{customer_id}/documents/{document_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "modified_reason=%3Cstring%3E&document_number=%3Cstring%3E¬e=%3Cstring%3E&document_type_id=%3Cstring%3E",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/x-www-form-urlencoded"
],
]);
$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://staging.api.commercengine.io/api/v1/{store_id}/storefront/customers/{customer_id}/documents/{document_id}"
payload := strings.NewReader("modified_reason=%3Cstring%3E&document_number=%3Cstring%3E¬e=%3Cstring%3E&document_type_id=%3Cstring%3E")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://staging.api.commercengine.io/api/v1/{store_id}/storefront/customers/{customer_id}/documents/{document_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("modified_reason=%3Cstring%3E&document_number=%3Cstring%3E¬e=%3Cstring%3E&document_type_id=%3Cstring%3E")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.commercengine.io/api/v1/{store_id}/storefront/customers/{customer_id}/documents/{document_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "modified_reason=%3Cstring%3E&document_number=%3Cstring%3E¬e=%3Cstring%3E&document_type_id=%3Cstring%3E"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"success": true,
"content": {
"document": {
"id": "<string>",
"document_number": "<string>",
"document_type_slug": "<string>",
"document_type_id": "<string>",
"created_by_user_id": "<string>",
"modified_by_user_id": "<string>",
"note": "<string>",
"status": "submitted",
"title": "<string>",
"file_url": "<string>",
"verification_type": "auto",
"is_verified": true,
"verified_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"modified_by": "<string>",
"modified_at": "2023-11-07T05:31:56Z",
"modified_reason": "<string>",
"expires_at": "2023-12-25"
}
}
}{
"message": "<string>",
"success": true,
"code": "<string>",
"errors": {},
"details": "<string>"
}{
"message": "Not authorized for given operation on the Resource.",
"success": false,
"code": "unauthorized",
"details": "<string>"
}{
"code": "<string>",
"message": "<string>",
"success": true,
"details": "<string>"
}{
"message": "<string>",
"success": true,
"code": "<string>",
"details": "<string>"
}{
"code": "<string>",
"message": "<string>",
"success": true,
"details": "<string>"
}{
"code": "<string>",
"message": "<string>",
"success": true,
"details": "<string>"
}Body
application/x-www-form-urlencodedmultipart/form-data
Was this page helpful?
⌘I
Update document detail
curl --request PUT \
--url https://staging.api.commercengine.io/api/v1/{store_id}/storefront/customers/{customer_id}/documents/{document_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'modified_reason=<string>' \
--data 'document_number=<string>' \
--data 'note=<string>' \
--data 'document_type_id=<string>'import requests
url = "https://staging.api.commercengine.io/api/v1/{store_id}/storefront/customers/{customer_id}/documents/{document_id}"
payload = {
"modified_reason": "<string>",
"document_number": "<string>",
"note": "<string>",
"document_type_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.put(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({
modified_reason: '<string>',
document_number: '<string>',
note: '<string>',
document_type_id: '<string>'
})
};
fetch('https://staging.api.commercengine.io/api/v1/{store_id}/storefront/customers/{customer_id}/documents/{document_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://staging.api.commercengine.io/api/v1/{store_id}/storefront/customers/{customer_id}/documents/{document_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "modified_reason=%3Cstring%3E&document_number=%3Cstring%3E¬e=%3Cstring%3E&document_type_id=%3Cstring%3E",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/x-www-form-urlencoded"
],
]);
$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://staging.api.commercengine.io/api/v1/{store_id}/storefront/customers/{customer_id}/documents/{document_id}"
payload := strings.NewReader("modified_reason=%3Cstring%3E&document_number=%3Cstring%3E¬e=%3Cstring%3E&document_type_id=%3Cstring%3E")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://staging.api.commercengine.io/api/v1/{store_id}/storefront/customers/{customer_id}/documents/{document_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("modified_reason=%3Cstring%3E&document_number=%3Cstring%3E¬e=%3Cstring%3E&document_type_id=%3Cstring%3E")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.commercengine.io/api/v1/{store_id}/storefront/customers/{customer_id}/documents/{document_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "modified_reason=%3Cstring%3E&document_number=%3Cstring%3E¬e=%3Cstring%3E&document_type_id=%3Cstring%3E"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"success": true,
"content": {
"document": {
"id": "<string>",
"document_number": "<string>",
"document_type_slug": "<string>",
"document_type_id": "<string>",
"created_by_user_id": "<string>",
"modified_by_user_id": "<string>",
"note": "<string>",
"status": "submitted",
"title": "<string>",
"file_url": "<string>",
"verification_type": "auto",
"is_verified": true,
"verified_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"modified_by": "<string>",
"modified_at": "2023-11-07T05:31:56Z",
"modified_reason": "<string>",
"expires_at": "2023-12-25"
}
}
}{
"message": "<string>",
"success": true,
"code": "<string>",
"errors": {},
"details": "<string>"
}{
"message": "Not authorized for given operation on the Resource.",
"success": false,
"code": "unauthorized",
"details": "<string>"
}{
"code": "<string>",
"message": "<string>",
"success": true,
"details": "<string>"
}{
"message": "<string>",
"success": true,
"code": "<string>",
"details": "<string>"
}{
"code": "<string>",
"message": "<string>",
"success": true,
"details": "<string>"
}{
"code": "<string>",
"message": "<string>",
"success": true,
"details": "<string>"
}