Imports

8 endpoints·Scopes: imports:read, imports:write
POST/api/imports#

Create an import run

scope · imports:writerole · MANAGER+

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

Scope: imports:write
Min role: MANAGER or higher
Endpoint: POST /api/imports

Example request

curl -X POST "https://app.guliel.com/api/imports" \
  -H "Authorization: Bearer $GULIEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "organizationId": "abc123",
  "sourceId": "abc123",
  "scope": {
    "entityTypes": [
      "CLIENT"
    ]
  }
}'

Request body

  • organizationIdreq
    string
  • sourceIdreq
    string
  • scopereq
    object
    • entityTypesreq
      array<enum<4>>
  • uploadId
    string
  • profileId
    string

Response (200/201)

  • runreq
    object
    • idreq
      string
    • organizationIdreq
      string
    • sourceIdreq
      string
    • statusreq
      string
    • entityTypesreq
      array<string>
    • uploadIdreq
      string | null
    • profileIdreq
      string | null
    • countsreq
      object
    • errorMessagereq
      string | null
    • startedAtreq
      string | null
    • completedAtreq
      string | null

Error responses

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

Get an import run

scope · imports:read

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

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

Example request

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

Query parameters

  • idreq
    string

Response (200/201)

  • runreq
    object
    • idreq
      string
    • organizationIdreq
      string
    • sourceIdreq
      string
    • statusreq
      string
    • entityTypesreq
      array<string>
    • uploadIdreq
      string | null
    • profileIdreq
      string | null
    • countsreq
      object
    • errorMessagereq
      string | null
    • startedAtreq
      string | null
    • completedAtreq
      string | null
  • recordsreq
    object
    • totalreq
      integer
    • willImportreq
      integer
    • byClassificationreq
      object
    • byDecisionreq
      object

Error responses

400Validation
401Unauthenticated
403Forbidden
500Internal
POST/api/imports/{id}/cancel#

Attach cancel to an import run

scope · imports:writerole · MANAGER+

Creates a new cancel attached to the given import run.

Scope: imports:write
Min role: MANAGER or higher
Endpoint: POST /api/imports/{id}/cancel

Example request

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

Request body

  • idreq
    string

Response (200/201)

  • idreq
    string
  • statusreq
    string

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
POST/api/imports/{id}/commit#

Attach commit to an import run

scope · imports:writerole · MANAGER+

Creates a new commit attached to the given import run.

Scope: imports:write
Min role: MANAGER or higher
Endpoint: POST /api/imports/{id}/commit

Example request

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

Request body

  • idreq
    string

Response (200/201)

  • idreq
    string
  • statusreq
    string
  • committedreq
    integer
  • skippedreq
    integer
  • failedreq
    integer

Error responses

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

List records for an import run

scope · imports:read

Returns every records row associated with the given import run.

Scope: imports:read
Endpoint: GET /api/imports/{id}/records

Example request

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

Query parameters

  • idreq
    string
  • entityType
    enum<4>
    CLIENT · ITEM · DOCUMENT · EXPENSE
  • classification
    enum<4>
    NEW · EXACT_DUPLICATE · PROBABLE_MATCH · INVALID
  • pagereq
    integer
  • limitreq
    integer

Response (200/201)

  • recordsreq
    array<object>
    • idreq
      string
    • entityTypereq
      string
    • externalIdreq
      string
    • normalizedreq
      any
    • classificationreq
      string
    • matchedLocalIdreq
      string | null
    • matchConfidencereq
      integer | null
    • matchEvidencereq
      any | null
    • decisionreq
      string
    • outcomereq
      string | null
    • localIdreq
      string | null
    • errorMessagereq
      string | null
  • paginationreq
    object
    • pagereq
      integer
    • limitreq
      integer
    • totalreq
      integer
    • totalPagesreq
      integer

Error responses

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

Update records on an import run

scope · imports:writerole · MANAGER+

Mutates the records attached to the given import run.

Scope: imports:write
Min role: MANAGER or higher
Endpoint: PATCH /api/imports/{id}/records

Example request

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

Request body

  • idreq
    string
  • decisionreq
    enum<3>
    IMPORT · SKIP · MERGE
  • entityType
    enum<4>
    CLIENT · ITEM · DOCUMENT · EXPENSE
  • classification
    enum<4>
    NEW · EXACT_DUPLICATE · PROBABLE_MATCH · INVALID
  • recordIds
    array<string>

Response (200/201)

  • updatedreq
    integer

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
POST/api/imports/upload#

Run upload (import runs)

scope · imports:writerole · MANAGER+

Performs the upload operation for the import runs feature.

Scope: imports:write
Min role: MANAGER or higher
Endpoint: POST /api/imports/upload

Example request

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

Request body

  • organizationIdreq
    string

Response (200/201)

  • uploadreq
    object
    • idreq
      string
    • filenamereq
      string
    • byteSizereq
      integer
    • storageKeyreq
      string

Error responses

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

List upload/columns for an import run

scope · imports:readrole · MANAGER+

Returns every upload/columns row associated with the given import run.

Scope: imports:read
Min role: MANAGER or higher
Endpoint: GET /api/imports/upload/{id}/columns

Example request

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

Query parameters

  • idreq
    string
  • organizationIdreq
    string
  • profileIdreq
    string

Response (200/201)

  • headersreq
    array<string>
  • rowCountreq
    integer
  • mappedreq
    object
  • missingRequiredreq
    array<string>
  • unmappedreq
    array<string>

Error responses

400Validation
401Unauthenticated
403Forbidden
500Internal