Utwórz połączenie
POST
/api/v3/Connections
const url = 'https://twoja-instancja-smerp-api.enterprise.sellrocket.pl/api/v3/Connections';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","connectionType":"example","externalSourceType":"example","externalSourceTypeName":"example","externalSourceId":"example","isConfigured":true,"id":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/Connections \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "connectionType": "example", "externalSourceType": "example", "externalSourceTypeName": "example", "externalSourceId": "example", "isConfigured": true, "id": 1 }'Dodaje nową integrację na podstawie definicji połączenia. Operacja asynchroniczna – zwraca zadanie (job), którego wynik sprawdzisz w Zadaniach asynchronicznych.
Autoryzacja
Dział zatytułowany „Autoryzacja”Treść żądania
Dział zatytułowany „Treść żądania”Typ treściapplication/json
object
name
string
connectionType
string
externalSourceType
string
externalSourceTypeName
string
externalSourceId
string
isConfigured
boolean
id
integer format: int64
Examplegenerated
{ "name": "example", "connectionType": "example", "externalSourceType": "example", "externalSourceTypeName": "example", "externalSourceId": "example", "isConfigured": true, "id": 1}Odpowiedzi
Dział zatytułowany „Odpowiedzi”Success
Typ treściapplication/json
object
id
integer format: int64
createdAt
string format: date-time
updatedAt
string format: date-time
payload
result
status
string
command
string
scope
string
scopeValue
string
silentMode
boolean
ajsChainId
string
ajsChainVisits
string
Example
{ "status": "New"}Bad Request
Typ treściapplication/json
object
type
string
title
string
status
integer format: int32
detail
string
instance
string
key
additional properties
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Unauthorized
Typ treściapplication/json
object
type
string
title
string
status
integer format: int32
detail
string
instance
string
key
additional properties
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Not Found
Typ treściapplication/json
object
type
string
title
string
status
integer format: int32
detail
string
instance
string
key
additional properties
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}
