Skip to main content
All endpoints on this page require admin JWT:
Authorization: Bearer <admin_jwt>

Endpoints

  • POST /api/connections
  • GET /api/connections
  • GET /api/connections/:id
  • PATCH /api/connections/:id
  • DELETE /api/connections/:id
  • PUT /api/connections/:id/enable
  • PUT /api/connections/:id/disable

Create / Update Payload

FieldTypeRequired on CreateNotes
apiTypestringYes`publicb2bcugmobile`
rateNamestringNoOptional placeholder
rateLimitnumberYes>= 0
rateLimitWindowMsnumberYes>= 0
netMarkupsnumberYes>= 0
connectionTypestringYes`directtgxmetasearch`
notificationEmailstringNoOptional
currentInUsebooleanNoOptional
partnerIdstringYesPartner ObjectId
Example create:
{
  "apiType": "b2b",
  "rateLimit": 60,
  "rateLimitWindowMs": 60000,
  "netMarkups": 0.05,
  "connectionType": "tgx",
  "notificationEmail": "alerts@partner.com",
  "currentInUse": true,
  "partnerId": "67a84f588277d6f3bc5ecfff"
}

List Query Parameters

GET /api/connections
QueryTypeRequiredNotes
pagenumberNo>= 1
sizenumberNo>= 1
partnerIdstringNoFilter by partner
Response is paginated as:
{
  "data": {
    "results": [],
    "total": 25,
    "size": 20,
    "page": 1,
    "totalPage": 2
  },
  "message": "success"
}

Enable / Disable Rules

  • PUT /:id/enable checks conflict: only one connection can be currentInUse=true under same (partner, apiType, connectionType)
  • PUT /:id/disable sets currentInUse=false

Common Errors

  • 404 Partner not found
  • 404 Connection not found
  • 409 Another connection is already currentInUse for this partner/apiType/connectionType