Update store
PUT
/dr/v1/stores/{storeID}
const url = 'https://sender.sandbox-api.kivra.com/dr/v1/stores/example';const options = { method: 'PUT', headers: {'Content-Type': 'application/json'}, body: '{"name":"Demo store","vat":"SE123456789100","owner_id":"1593602546268ce6ece6cf49969f52f8a724e6f1f5","address":{"street1":"Gatan 1","postalcode":"13254","city":"onebuying","country":"SWE"},"icon":{"data":"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=","content_type":"image/png"},"logo":{"data":"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=","content_type":"image/png"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://sender.sandbox-api.kivra.com/dr/v1/stores/example \ --header 'Content-Type: application/json' \ --data '{ "name": "Demo store", "vat": "SE123456789100", "owner_id": "1593602546268ce6ece6cf49969f52f8a724e6f1f5", "address": { "street1": "Gatan 1", "postalcode": "13254", "city": "onebuying", "country": "SWE" }, "icon": { "data": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=", "content_type": "image/png" }, "logo": { "data": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=", "content_type": "image/png" } }'A partner can update store information using this endpoint.
Access scope
- PARTNER
- CHAIN
- STORE
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”storeID
required
string
Store ID
Request Bodyrequired
Section titled “Request Bodyrequired”Takes in a store object with fields to be modified. Fields not present in the body are not modified.
Media typeapplication/json
UpdateStore
object
name
The name of the store
string
vat
The VAT number of the store
string
owner_id
ID of the owner company (chain)
string
phone
The phone number of the store
string
address
The address of the store
object
street1
string
street2
string
street3
string
postalcode
string
city
string
state
string
country
string
icon
Icon displayed on the receipt
object
data
required
Base64 encoded image
string
content_type
required
The image content type
string
logo
Logo displayed on the receipt
object
data
required
Base64 encoded image
string
content_type
required
The image content type
string
Example
{ "name": "Demo store", "vat": "SE123456789100", "owner_id": "1593602546268ce6ece6cf49969f52f8a724e6f1f5", "address": { "street1": "Gatan 1", "postalcode": "13254", "city": "onebuying", "country": "SWE" }, "icon": { "data": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=", "content_type": "image/png" }, "logo": { "data": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=", "content_type": "image/png" }}Responses
Section titled “Responses”Store successfully updated
Media typeapplication/json
object
Examplegenerated
{}Bad request
Media typeapplication/json
ErrorResponse
object
error_code
string
short_message
string
long_message
string
error_detail
Array<string>
Examples
Exampleunauthorized
{ "error_code": "40000", "short_message": "bad request", "long_message": "body s missing required fields or has invalid fields"}Unauthorized
Media typeapplication/json
ErrorResponse
object
error_code
string
short_message
string
long_message
string
error_detail
Array<string>
Examples
Exampleunauthorized
{ "error_code": "40100", "short_message": "unauthorized", "long_message": "permission denied"}Conflict
Media typeapplication/json
ErrorResponse
object
error_code
string
short_message
string
long_message
string
error_detail
Array<string>
Examples
Examplevat_exists
{ "error_code": "40900", "short_message": "conflict", "long_message": "company with the given vat exists"}Internal server error
Media typeapplication/json
ErrorResponse
object
error_code
string
short_message
string
long_message
string
error_detail
Array<string>
Example
{ "error_code": "50000", "short_message": "internal server error", "long_message": "unknown error ocurred"}