Suppliers

Supplier directory, cross-org invitations, accepted supplier catalogs.

9 endpoints·Scopes: suppliers:read, suppliers:write
GET/api/suppliers#

List suppliers

scope · suppliers:read

Lists suppliers the caller can see. Results are filtered by the caller's accessible organizations; many routes paginate via page and limit.

Scope: suppliers:read
Endpoint: GET /api/suppliers

Example request

curl "https://guliel.com/api/suppliers?organizationId=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • organizationIdreq
    string
  • pagereq
    integer
  • limitreq
    integer
  • searchreq
    string
  • statusreq
    string
  • sortByreq
    enum<4>
    name · email · status · createdAt
  • sortOrderreq
    enum<2>
    asc · desc

Response (200/201)

  • suppliersreq
    array<object>
    • idreq
      string
    • organizationIdreq
      string
    • namereq
      string
    • contactNamereq
      string | null
    • emailreq
      string | null
    • phonereq
      string | null
    • addressreq
      string | null
    • countryreq
      string | null
    • registrationNumberreq
      string | null
    • defaultCurrenciesreq
      array<string>
    • statusreq
      stringACCEPTED | PENDING — pending suppliers represent unaccepted invitations.
    • invitationMethodreq
      string | null
    • invitedAtreq
      string | null
    • acceptedAtreq
      string | null
    • acceptedByUserIdreq
      string | null
    • supplierOrganizationIdreq
      string | nullSet when this supplier is itself a Guliel-registered organization (cross-org consolidation).
    • activeOrderCountreq
      integer
    • createdAtreq
      string
    • updatedAtreq
      string
  • paginationreq
    object
    • pagereq
      integer
    • limitreq
      integer
    • totalreq
      integer
    • totalPagesreq
      integer

Error responses

400Validation
401Unauthenticated
403Forbidden
500Internal
POST/api/suppliers#

Create a supplier

scope · suppliers:writerole · CONTRIBUTOR+

Creates a new supplier in the target organization. Returns the created record on success.

Scope: suppliers:write
Min role: CONTRIBUTOR or higher
Endpoint: POST /api/suppliers

Example request

curl -X POST "https://guliel.com/api/suppliers" \
  -H "Authorization: Bearer $GULIEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "organizationId": "abc123",
  "mode": "email"
}'

Request body

  • organizationIdreq
    string
  • modereq
    enum<3>
    email · link · manual
  • email
    string <email>
  • name
    string
  • phone
    string
  • address
    string
  • country
    string
  • registrationNumber
    string

Response (200/201)

  • idreq
    string
  • organizationIdreq
    string
  • namereq
    string
  • contactNamereq
    string | null
  • emailreq
    string | null
  • phonereq
    string | null
  • addressreq
    string | null
  • countryreq
    string | null
  • registrationNumberreq
    string | null
  • defaultCurrenciesreq
    array<string>
  • statusreq
    stringACCEPTED | PENDING — pending suppliers represent unaccepted invitations.
  • invitationMethodreq
    string | null
  • invitedAtreq
    string | null
  • acceptedAtreq
    string | null
  • acceptedByUserIdreq
    string | null
  • supplierOrganizationIdreq
    string | nullSet when this supplier is itself a Guliel-registered organization (cross-org consolidation).
  • activeOrderCount
    integer
  • createdAtreq
    string
  • updatedAtreq
    string

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
DELETE/api/suppliers/{id}#

Delete a supplier

scope · suppliers:write

Deletes the supplier. Some endpoints hard-delete the row, others soft-revoke (set revokedAt). Check the response shape.

Scope: suppliers:write
Endpoint: DELETE /api/suppliers/{id}

Example request

curl -X DELETE "https://guliel.com/api/suppliers/abc123?id=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • idreq
    string
  • mode
    string | string

Response (200/201)

  • successreq
    boolean
  • modereq
    string | stringWhich delete path executed — hard removes the row, soft sets status=INACTIVE to preserve order history.

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
GET/api/suppliers/{id}#

Get a supplier

scope · suppliers:read

Fetches a single supplier by id. Returns 404 if the supplier isn't in the caller's accessible organizations.

Scope: suppliers:read
Endpoint: GET /api/suppliers/{id}

Example request

curl "https://guliel.com/api/suppliers/abc123?id=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • idreq
    string

Response (200/201)

  • idreq
    string
  • organizationIdreq
    string
  • namereq
    string | null
  • emailreq
    string | null
  • phonereq
    string | null
  • addressreq
    string | null
  • countryreq
    string | null
  • registrationNumberreq
    string | null
  • statusreq
    string
  • supplierOrganizationIdreq
    string | null
  • supplierOrganizationreq
    object | null
  • _count
    object
    • ordersreq
      integer
  • activeOrderCountreq
    integer
  • createdAtreq
    string
  • updatedAtreq
    string

Error responses

400Validation
401Unauthenticated
403Forbidden
500Internal
PATCH/api/suppliers/{id}#

Update a supplier

scope · suppliers:write

Updates an existing supplier. Only the fields present in the request body are changed; omitted fields stay as-is.

Scope: suppliers:write
Endpoint: PATCH /api/suppliers/{id}

Example request

curl -X PATCH "https://guliel.com/api/suppliers/abc123" \
  -H "Authorization: Bearer $GULIEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "id": "abc123"
}'

Request body

  • idreq
    string
  • name
    string | null
  • email
    string | null
  • phone
    string | null
  • address
    string | null
  • country
    string | null
  • registrationNumber
    string | null

Response (200/201)

  • idreq
    string
  • organizationIdreq
    string
  • namereq
    string | null
  • emailreq
    string | null
  • phonereq
    string | null
  • addressreq
    string | null
  • countryreq
    string | null
  • registrationNumberreq
    string | null
  • statusreq
    string
  • supplierOrganizationIdreq
    string | null
  • supplierOrganization
    object | null
  • _count
    object
    • ordersreq
      integer
  • activeOrderCount
    integer
  • createdAtreq
    string
  • updatedAtreq
    string

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
PUT/api/suppliers/{id}#

Update a supplier

scope · suppliers:write

Replaces an existing supplier. All required fields must be supplied — omitted fields revert to their schema defaults.

Scope: suppliers:write
Endpoint: PUT /api/suppliers/{id}

Example request

curl -X PUT "https://guliel.com/api/suppliers/abc123" \
  -H "Authorization: Bearer $GULIEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "id": "abc123"
}'

Request body

  • idreq
    string
  • name
    string | null
  • email
    string | null
  • phone
    string | null
  • address
    string | null
  • country
    string | null
  • registrationNumber
    string | null

Response (200/201)

  • idreq
    string
  • organizationIdreq
    string
  • namereq
    string | null
  • emailreq
    string | null
  • phonereq
    string | null
  • addressreq
    string | null
  • countryreq
    string | null
  • registrationNumberreq
    string | null
  • statusreq
    string
  • supplierOrganizationIdreq
    string | null
  • supplierOrganization
    object | null
  • _count
    object
    • ordersreq
      integer
  • activeOrderCount
    integer
  • createdAtreq
    string
  • updatedAtreq
    string

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
GET/api/suppliers/{id}/items#

List items for a supplier

scope · suppliers:read

Returns every items row associated with the given supplier.

Scope: suppliers:read
Endpoint: GET /api/suppliers/{id}/items

Example request

curl "https://guliel.com/api/suppliers/abc123/items?id=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • idreq
    string

Response (200/201)

  • itemsreq
    array<object>
    • idreq
      string
    • namereq
      string
    • descriptionreq
      string | null
    • skureq
      string | null
    • unitPricereq
      number | null
    • currencyreq
      string | null
    • isActivereq
      boolean
    • availableForExternalOrderreq
      boolean

Error responses

400Validation
401Unauthenticated
403Forbidden
500Internal
POST/api/suppliers/{id}/resend-invitation#

Attach resend invitation to a supplier

scope · suppliers:write

Creates a new resend-invitation attached to the given supplier.

Scope: suppliers:write
Endpoint: POST /api/suppliers/{id}/resend-invitation

Example request

curl -X POST "https://guliel.com/api/suppliers/abc123/resend-invitation" \
  -H "Authorization: Bearer $GULIEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "id": "abc123"
}'

Request body

  • idreq
    string

Response (200/201)

  • supplierreq
    objectUpdated supplier row — see /api/suppliers/[id] GET for the canonical shape.
  • inviteUrlreq
    stringPre-signed invitation acceptance URL the recipient can open.
  • emailSentreq
    booleanFalse if the supplier had no email on file; the inviteUrl still works.

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
GET/api/suppliers/export/csv#

Export suppliers as CSV

scope · suppliers:read

Streams the caller's suppliers as a CSV file. Filter parameters scope the export the same way the list endpoint does.

Scope: suppliers:read
Endpoint: GET /api/suppliers/export/csv

Example request

curl "https://guliel.com/api/suppliers/export/csv?organizationId=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • organizationIdreq
    string
  • status
    string
  • search
    string

Response (200/201)

JSON object. The exact response shape is being progressively documented — call the endpoint with a real access token to see the live structure, or check the type definitions exposed by the official client libraries.

Error responses

400Validation
401Unauthenticated
403Forbidden
500Internal