update-document
Method: PUT
Path: /customers/{customer_id}/documents/{document_id}
Tags: KYC documents
Summary
Update document detail
Storefront SDK Usage
SDK Method: sdk.customer.updateDocument()
Example:
typescript
const { data, error } = await sdk.customer.updateDocument({ customer_id: "customer-123", document_id: "document-123" }, { modified_reason: "Renewed document" });TypeScript Definition
typescript
"update-document": {
parameters: {
query?: never;
header?: never;
path: {
/** @description customer id */
customer_id: string;
/** @description document id */
document_id: string;
};
cookie?: never;
};
requestBody: {
content: {
"application/x-www-form-urlencoded": {
document_number?: string;
note?: string;
modified_reason: string;
document_type_id?: string;
};
"multipart/form-data": components["schemas"]["UpdateDocument"];
};
};
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
message: string;
success: boolean;
content: {
document: components["schemas"]["Document"];
};
};
};
};
400: components["responses"]["BadRequest"];
401: components["responses"]["Unauthorized"];
403: components["responses"]["Forbidden"];
404: components["responses"]["NotFound"];
500: components["responses"]["InternalServerError"];
504: components["responses"]["GatewayTimeout"];
};
};Component References
| Reference | Resolves To |
|---|---|
components["schemas"]["UpdateDocument"] | UpdateDocument |
components["schemas"]["Document"] | Document |
components["responses"]["BadRequest"] | BadRequest |
components["responses"]["Unauthorized"] | Unauthorized |
components["responses"]["Forbidden"] | Forbidden |
components["responses"]["NotFound"] | NotFound |
components["responses"]["InternalServerError"] | InternalServerError |
components["responses"]["GatewayTimeout"] | GatewayTimeout |
Request Body
Content Types: application/x-www-form-urlencoded, multipart/form-data
Responses
200
OK
400
Bad request
401
Authentication failed. Codes include token-required, token-expired and token_not_valid for an invalid or expired token.
403
Access denied. token-required requires an authenticated session; permission-denied means the caller cannot access this resource. On POS, session-expired requires signing in again.
404
Requested resource not found
500
The request failed because of an unexpected error.
504
The request timed out.
OpenAPI Definition
json
{
"tags": [
"KYC documents"
],
"operationId": "update-document",
"summary": "Update document detail",
"externalDocs": {
"url": "https://llm-docs.commercengine.io/storefront/operations/update-document",
"description": "API reference for the update-document operation"
},
"requestBody": {
"required": true,
"content": {
"application/x-www-form-urlencoded": {
"schema": {
"type": "object",
"required": [
"modified_reason"
],
"properties": {
"document_number": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"pattern": "\\S"
},
"note": {
"type": "string",
"maxLength": 512,
"minLength": 1,
"pattern": "\\S"
},
"modified_reason": {
"type": "string",
"minLength": 1,
"pattern": "\\S"
},
"document_type_id": {
"type": "string",
"maxLength": 32,
"minLength": 1,
"pattern": "\\S"
}
},
"x-tags": [
"KYC"
]
}
},
"multipart/form-data": {
"schema": {
"type": "object",
"$ref": "#/components/schemas/UpdateDocument"
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"message",
"success",
"content"
],
"properties": {
"message": {
"type": "string"
},
"success": {
"type": "boolean"
},
"content": {
"properties": {
"document": {
"$ref": "#/components/schemas/Document"
}
},
"required": [
"document"
],
"type": "object"
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
},
"504": {
"$ref": "#/components/responses/GatewayTimeout"
}
},
"security": [
{
"Authorization": []
}
],
"x-speakeasy-group": "kyc",
"x-speakeasy-ignore": true,
"x-speakeasy-name-override": "updateDocument"
}Auto-generated from OpenAPI spec and TypeScript definitions