Wygeneruj token API
POST
/api/v3/Tokens
const url = 'https://twoja-instancja-smerp-api.enterprise.sellrocket.pl/api/v3/Tokens';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"expiresInSeconds":1,"apiRateLimit":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://twoja-instancja-smerp-api.enterprise.sellrocket.pl/api/v3/Tokens \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "expiresInSeconds": 1, "apiRateLimit": 1 }'Wydaje token dostępu do API dla bieżącego użytkownika; można ustawić czas ważności i limit zapytań.
Autoryzacja
Dział zatytułowany „Autoryzacja”Treść żądania
Dział zatytułowany „Treść żądania”object
expiresInSeconds
integer format: int64
apiRateLimit
integer format: int32
Examplegenerated
{ "expiresInSeconds": 1, "apiRateLimit": 1}object
expiresInSeconds
integer format: int64
apiRateLimit
integer format: int32
Examplegenerated
{ "expiresInSeconds": 1, "apiRateLimit": 1}object
expiresInSeconds
integer format: int64
apiRateLimit
integer format: int32
Examplegenerated
{ "expiresInSeconds": 1, "apiRateLimit": 1}object
expiresInSeconds
integer format: int64
apiRateLimit
integer format: int32
object
expiresInSeconds
integer format: int64
apiRateLimit
integer format: int32
object
expiresInSeconds
integer format: int64
apiRateLimit
integer format: int32
Odpowiedzi
Dział zatytułowany „Odpowiedzi”Success
object
success
boolean
message
string
jwt
string
expiredAt
string format: date-time
issuedAt
string format: date-time
object
success
boolean
message
string
jwt
string
expiredAt
string format: date-time
issuedAt
string format: date-time
Examplegenerated
{ "success": true, "message": "example", "jwt": "example", "expiredAt": "2026-04-15T12:00:00Z", "issuedAt": "2026-04-15T12:00:00Z"}object
success
boolean
message
string
jwt
string
expiredAt
string format: date-time
issuedAt
string format: date-time
Examplegenerated
{ "success": true, "message": "example", "jwt": "example", "expiredAt": "2026-04-15T12:00:00Z", "issuedAt": "2026-04-15T12:00:00Z"}object
success
boolean
message
string
jwt
string
expiredAt
string format: date-time
issuedAt
string format: date-time
object
success
boolean
message
string
jwt
string
expiredAt
string format: date-time
issuedAt
string format: date-time

