Files
sf-nfc-server/docs/nfc-server/Generate activation label.yml
2026-03-10 15:44:48 +01:00

97 lines
1.8 KiB
YAML

info:
name: Generate an activation label
type: http
seq: 2
http:
method: POST
url: "{{baseUrl}}/nfc/generate"
body:
type: json
data: |-
{
"cardId": "",
"override": false
}
auth: inherit
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
examples:
- name: 200 Response
description: Label generated or reused successfully
request:
url: "{{baseUrl}}/nfc/generate"
method: POST
body:
type: json
data: |-
{
"cardId": "",
"override": false
}
response:
status: 200
statusText: OK
headers:
- name: Content-Type
value: application/json
body:
type: json
data: |-
{
"code": "",
"label": "",
"overriden": false,
"reused": false
}
- name: 422 Response
description: Validation error
request:
url: "{{baseUrl}}/nfc/generate"
method: POST
body:
type: json
data: |-
{
"cardId": "",
"override": false
}
response:
status: 422
statusText: Unprocessable Entity
headers:
- name: Content-Type
value: application/json
body:
type: json
data: |-
{
"error": {
"msg": "",
"field": ""
}
}
- name: 500 Response
description: Internal server error
request:
url: "{{baseUrl}}/nfc/generate"
method: POST
body:
type: json
data: |-
{
"cardId": "",
"override": false
}
response:
status: 500
statusText: Internal Server Error
body:
type: text
data: ""