Katana App – how to

Use case:

We wan’t to do an order in the KATANA-Storefront again by pressing a Click-Beacon. The app is used as a gateway to the Katana-Storefront, to order an old order again via Beacon. So we need to connect the Beacon to our App. We have to see all past orders from the Customer which is looged in to the app, we need the possibility to select an old order for the automatic order via Beacon, and we have to send it to the Storefronts Backend Database System.

 

 

API-Documentation:

User-Idendification:

– https://katana-be.digital-worx.com/oauth/v2/token

Headers: “Content-Type:application/x-www-form-urlencoded”
Body: grant_type:client_credentials
client_id:7_4tcowkwoz76sg0gok0ggc40o0k0gcc4c44woocggco0s44kwkw
client_secret:2n1hzcbsq0ao04ssg80cckggk8k0sk4wocwcs4c0s804ogo8w0
Response: {
„access_token“:
„M2IzNjJkNzcxZDVjMGRmYmZhYzQwNmEyYTM5ZjczNGZjN2Y2MjhiN2JkOTZkMzBhODc1N
2FiYWIwNzVhMDFiNA“,
„expires_in“: 3600,
„token_type“: „bearer“,
„scope“: „user“
}

 

– https://katana-be.digital-worx.com/api/user/centralid

Headers: “Content-Type:application/x-www-form-urlencoded
Authorization:Bearer
M2IzNjJkNzcxZDVjMGRmYmZhYzQwNmEyYTM5ZjczNGZjN2Y2MjhiN2JkOTZkMzBhODc1N2FiYWI
wNzVhMDFiNA”
Body “login:dmlyYWc6dGVzdDEyMw==”
Response: {
„id“: 7,
„apikey“: „1qe23e45b150cb17e24aabe022372“
}

 

Connect the 2 Endpoints of the System:

– https://katana-honey.digital-worx.com/api/app/voucher/v100/2/auth

Headers: “Content-Type:application/json”
Body: {
„username“: „USERNAME“,
„usertoken“: „45b150cb17e24aabe0223727a28c67ad“,
„uuid“: „uuid“,
„lang“: „deu“
}
Response: {
„auth“: true,
„apitoken“: „VOUCHERAPI595F80807938A4.76417825“
}

 

Read Orders:

– https://katana-honey.digital-worx.com/api/app/voucher/v100/2/orders

Headers: “Content-Type:application/x-www-form-urlencoded”
Body: {
„apitoken“: „VOUCHERAPI595F80807938A4.76417825“,
„days“: 130
}
Response: Array of Order items

 

Placing the new Order:

– https://katana-honey.digital-worx.com/api/app/voucher/v100/2/reorder/433

Headers: “Content-Type:application/json”
Body: {
„apitoken“:“VOUCHERAPI595F80807938A4.76417825″
}
Response: {
„Message“: “ ‘success’ | ‘failure’ | ‘Api token not provided’ “
}

 

Delivery
Returns a List of Deliveries

– https://katana-honey.digital-worx.com/
POST /{_locale}/delivery/list

Requirements
Name     Requirement     Type     Description
_locale de|en     string     System     language

Headers
Name     Required?     Description
token     true         Token: abcdef123456

Status Codes
Status Code     Description
200         Returned when successful
401         Returned when token invalid
405         Returned when Method not allowed

 

Shop Location
Returns a List of Shops with Geolocation

– https://katana-client.digital-worx.com
POST /{_locale}/api/shoplocation/list

Requirements
Name     Requirement     Type     Description
_locale de|en     string     System     language

Status Codes
Status Code     Description
200         Returned when successful