Skip to content

File upload requests

Collect a file from a customer or partner through a secure, time-limited upload link.

Upload requests let a customer, supplier, or other partner add a file to your Inttegro account through a secure, time-limited link. Your application creates the request and shares the link; the uploader sends the file directly to Inttegro without gaining access to your API credentials.

Use an upload request when someone outside your application needs to provide a product image, downloadable product, catalog import, video, or support document. Each request collects one file and produces a normal Inttegro file when the upload succeeds.

The upload request object

An upload request records what file you expect, who should provide it, and whether it has arrived. New requests start as Inttegro.UploadRequestStatuses.Pending; an accepted file changes the request to Inttegro.UploadRequestStatuses.Fulfilled and sets fileId. A request can instead become Inttegro.UploadRequestStatuses.Failed, Inttegro.UploadRequestStatuses.Expired, or Inttegro.UploadRequestStatuses.Canceled.

Use active to decide whether the link can still accept a file. When a request is fulfilled, retrieve the resulting file through Lookup a file.

Properties

TypeScript SDK responseUploadRequestv15.0.0

When an attempt has been reviewed, attempt.review records the decision, the review time, an optional message for the uploader, and any structured reasons.

For "products_import", every nonblank data row must contain at least these columns in order: name, type, price_currency, price_value, reference, description, about, category, tax_code, unit_dimension, price_label, publish, and attributes. An optional first header row may use those names in the same order. The file must contain between 1 and 10,000 data rows.

Create an upload request POST /upload_requests/create

Create an upload request when another person or system should send the file directly to Inttegro. The response includes a secure uploadUrl that you can place behind a button, send in a message, or hand to another trusted system.

The purpose sets the kinds and maximum size of file Inttegro accepts. Use constraints only when this particular request should be stricter—for example, to accept only PDF support documents under 10 MiB.

Request body

TypeScript SDK requestUploadRequestCreateRequestv15.0.0

Upload limits

Response

Returns the new upload request and its uploadUrl. Save the URL when you create the request because Inttegro does not return it again through lookup, page, or cancel.

Treat the URL like a temporary secret: anyone who has the complete URL can upload against the request. Use a stable idempotency key when retrying this call so that a network failure does not create multiple live links for the same upload.

Request

POST/upload_requests/create
cURLbash
curl https://api.inttegro.com/upload_requests/create \
-H "Authorization: Bearer $INTTEGRO_API_KEY" \
-H "Idempotency-Key: support-doc-upload-001" \
-H "Content-Type: application/json" \
-d '{
"purpose": "support_document",
"constraints": {
  "content_types": ["application/pdf"],
  "max_size": 10485760
},
"display": {
  "title": "Upload dispute evidence",
  "help_text": "Attach a PDF under 10 MB."
},
"recipient": { "type": "customer", "email": "ama@example.com" },
"resource": { "type": "dispute", "id": "disp_123" },
"custom_data": { "case_id": "CASE-1001" },
"expires_at": "2030-07-06T12:30:00Z"
}'
TypeScripttypescript
import { InttegroClient } from '@inttegro/inttegro-sdk'

const inttegro = new InttegroClient({
  apiKey: process.env.INTTEGRO_API_KEY!,
})

const result = await inttegro.uploadRequests.create({
  purpose: "support_document",
  constraints: {
    contentTypes: [
      "application/pdf",
    ],
    maxSize: 10485760,
  },
  display: {
    title: "Upload dispute evidence",
    helpText: "Attach a PDF under 10 MB.",
  },
  recipient: {
    type: "customer",
    email: "ama@example.com",
  },
  resource: {
    type: "dispute",
    id: "disp_123",
  },
  customData: {
    case_id: "CASE-1001",
  },
  expiresAt: new Date("2030-07-06T12:30:00Z"),
}, {
  idempotencyKey: "support-doc-upload-001",
})
Gogo
package main

import (
  "context"
  "log"
  "os"
  "time"

  inttegro "github.com/inttegro/inttegro-sdk-go/v14"
  "github.com/inttegro/inttegro-sdk-go/v14/customdata"
  "github.com/inttegro/inttegro-sdk-go/v14/request"
  "github.com/inttegro/inttegro-sdk-go/v14/uploadrequest"
)

func main() {
  ctx := context.Background()
  client := inttegro.NewClient(os.Getenv("INTTEGRO_API_KEY"))

  params := uploadrequest.CreateParams{
    Purpose: "support_document",
    Constraints: uploadrequest.Constraints{
      ContentTypes: []string{
        "application/pdf",
      },
      MaxSize: 10485760,
    },
    Display: uploadrequest.Display{
      Title: "Upload dispute evidence",
      HelpText: "Attach a PDF under 10 MB.",
    },
    Recipient: uploadrequest.Party{
      Type: "customer",
      Email: "ama@example.com",
    },
    Resource: uploadrequest.FileResource{
      Type: "dispute",
      ID: "disp_123",
    },
    CustomData: func() *customdata.Data { value, err := customdata.New(map[string]string{
        "case_id": "CASE-1001",
      }); if err != nil { panic(err) }; return value }(),
    ExpiresAt: mustParseTime("2030-07-06T12:30:00Z"),
  }
  result, err := client.UploadRequests.Create(ctx, params, request.WithIdempotencyKey("support-doc-upload-001"))
  if err != nil {
    log.Fatal(err)
  }
  _ = result
}

func mustParseTime(value string) *time.Time {
  parsed, err := time.Parse(time.RFC3339, value)
  if err != nil {
    panic(err)
  }
  return &parsed
}
Pythonpython
import os
from datetime import datetime

import inttegro
from inttegro import InttegroClient

client = InttegroClient(api_key=os.environ["INTTEGRO_API_KEY"])

result = client.upload_requests.create(inttegro.upload_request.CreateRequest(
  purpose="support_document",
  constraints=inttegro.upload_request.ConstraintsInput(
    content_types=[
      "application/pdf",
    ],
    max_size=10485760,
  ),
  display=inttegro.upload_request.DisplayInput(
    title="Upload dispute evidence",
    help_text="Attach a PDF under 10 MB.",
  ),
  recipient=inttegro.file.PartyInput(
    type="customer",
    email="ama@example.com",
  ),
  resource=inttegro.file.ResourceInput(
    type="dispute",
    id="disp_123",
  ),
  custom_data=inttegro.CustomData({
    "case_id": "CASE-1001",
  }),
  expires_at=datetime.fromisoformat("2030-07-06T12:30:00Z".replace("Z", "+00:00")),
),
    idempotency_key="support-doc-upload-001")
PHPphp
<?php

use Inttegro\Client;

$client = new Client($_ENV['INTTEGRO_API_KEY']);
$result = $client->uploadRequests->create([
  'purpose' => 'support_document',
  'constraints' => [
    'content_types' => [
      'application/pdf',
    ],
    'max_size' => 10485760,
  ],
  'display' => [
    'title' => 'Upload dispute evidence',
    'help_text' => 'Attach a PDF under 10 MB.',
  ],
  'recipient' => [
    'type' => 'customer',
    'email' => 'ama@example.com',
  ],
  'resource' => [
    'type' => 'dispute',
    'id' => 'disp_123',
  ],
  'custom_data' => [
    'case_id' => 'CASE-1001',
  ],
  'expires_at' => '2030-07-06T12:30:00Z',
]);
Rubyruby
require "inttegro"

client = Inttegro::Client.new(api_key: ENV.fetch("INTTEGRO_API_KEY"))
result = client.upload_requests.create(
  purpose: "support_document",
  constraints: {
    content_types: [
      "application/pdf",
    ],
    max_size: 10485760,
  },
  display: {
    title: "Upload dispute evidence",
    help_text: "Attach a PDF under 10 MB.",
  },
  recipient: {
    type: "customer",
    email: "ama@example.com",
  },
  resource: {
    type: "dispute",
    id: "disp_123",
  },
  custom_data: {
    case_id: "CASE-1001",
  },
  expires_at: "2030-07-06T12:30:00Z",
  idempotency_key: "support-doc-upload-001"
)
Javajava
import com.inttegro.Client;
import com.inttegro.files.UploadRequestCreateParams;
import com.inttegro.files.UploadConstraints;
import java.util.List;
import com.inttegro.files.UploadDisplay;
import com.inttegro.files.Actor;
import com.inttegro.files.ResourceRef;
import com.inttegro.CustomData;
import java.time.OffsetDateTime;
import com.inttegro.RequestOptions;

public class Example {
  public static void main(String[] args) throws Exception {
    var client = new Client(System.getenv("INTTEGRO_API_KEY"));
    var params = UploadRequestCreateParams.builder()
      .purpose("support_document")
      .constraints(UploadConstraints.builder()
          .contentTypes(List.of(
              "application/pdf"
            ))
          .maxSize(10485760)
          .build())
      .display(UploadDisplay.builder()
          .title("Upload dispute evidence")
          .helpText("Attach a PDF under 10 MB.")
          .build())
      .recipient(Actor.builder()
          .type("customer")
          .email("ama@example.com")
          .build())
      .resource(ResourceRef.builder()
          .type("dispute")
          .id("disp_123")
          .build())
      .customData(new CustomData()
          .set("case_id", "CASE-1001"))
      .expiresAt(OffsetDateTime.parse("2030-07-06T12:30:00Z"))
      .build();
    var result = client.uploadRequests().create(params, RequestOptions.withIdempotencyKey("support-doc-upload-001"));
  }
}
C#csharp
using Inttegro;

using var inttegro = new InttegroClient(
    Environment.GetEnvironmentVariable("INTTEGRO_API_KEY")!
);
var result = await inttegro.UploadRequests.CreateAsync(new {
  purpose = "support_document",
  constraints = new {
    content_types = new[] {
      "application/pdf",
    },
    max_size = 10485760,
  },
  display = new {
    title = "Upload dispute evidence",
    help_text = "Attach a PDF under 10 MB.",
  },
  recipient = new {
    type = "customer",
    email = "ama@example.com",
  },
  resource = new {
    type = "dispute",
    id = "disp_123",
  },
  custom_data = new {
    case_id = "CASE-1001",
  },
  expires_at = "2030-07-06T12:30:00Z",
}, "support-doc-upload-001");
Responsejson
{
  "upload_request": {
    "id": "uplreq_1gK9pQ4vL8mN2sT5wX7yZ0",
    "purpose": "support_document",
    "status": "pending",
    "active": true,
    "upload_url": "<UPLOAD_URL>",
    "constraints": {
      "content_types": ["application/pdf"],
      "max_size": 10485760
    },
    "display": {
      "help_text": "Attach a PDF under 10 MB.",
      "title": "Upload dispute evidence"
    },
    "subject": {},
    "recipient": { "type": "customer", "email": "ama@example.com" },
    "resource": { "type": "dispute", "id": "disp_123" },
    "requester": { "type": "api_key" },
    "attempts": {
      "max_attempts": 3,
      "attempt_count": 0,
      "failed_attempt_count": 0
    },
    "custom_data": { "case_id": "CASE-1001" },
    "created_at": "2026-06-05T12:30:00Z",
    "updated_at": "2026-06-05T12:30:00Z",
    "expires_at": "2030-07-06T12:30:00Z"
  }
}

Fulfill an upload request POST /upload_requests/upload

Send the file as multipart/form-data to the complete upload link returned when the request was created. This call is made by the uploader and does not use your application’s API key; the secure values needed to accept the upload are already part of the URL.

Use the URL exactly as returned. Do not extract, log, or reconstruct its query parameters.

Included in the upload URL

TypeScript SDK requestv15.0.0
  • #idstringrequired

    Identifies the upload request. It is already present in the generated upload link.

  • #tokenstringrequired

    Authorizes the upload. It is already present in the generated upload link and must remain private.

Request body

TypeScript SDK requestv15.0.0
  • #fileBlob | ReadableStreamrequired

    File selected by the uploader.

Response

Returns the fulfilled upload request and a file receipt containing the resulting file.id. Your authenticated backend can pass that ID to Lookup a file when it needs the complete file object.

If Inttegro rejects the file, the response includes an error and the failed attempt. Check error.retryable before offering another try. A retryable failure leaves the request pending while attempts remain; otherwise, create a new upload request.

Expired, canceled, fulfilled, and exhausted requests no longer accept uploads.

Request

POST/upload_requests/upload
cURLbash
curl "<UPLOAD_URL>" \
  -F "file=@./evidence.pdf;type=application/pdf"
TypeScripttypescript
import { InttegroClient } from '@inttegro/inttegro-sdk'

const inttegro = new InttegroClient({
  apiKey: process.env.INTTEGRO_API_KEY!,
})

const result = await inttegro.uploadRequests.fulfill({
  uploadUrl: '<UPLOAD_URL>',
  file: './evidence.pdf',
})
Gogo
package main

import (
  "context"
  "log"
  "os"

  inttegro "github.com/inttegro/inttegro-sdk-go/v14"
  "github.com/inttegro/inttegro-sdk-go/v14/uploadrequest"
)

func main() {
  ctx := context.Background()
  client := inttegro.NewClient(os.Getenv("INTTEGRO_API_KEY"))

  uploadRequest, file, err := client.UploadRequests.Fulfill(ctx, uploadrequest.FulfillParams{
    UploadURL: "<UPLOAD_URL>",
    File:      "./evidence.pdf",
  })
  if err != nil {
    log.Fatal(err)
  }
  _ = uploadRequest
  _ = file
}
Pythonpython
import os

from inttegro import InttegroClient

client = InttegroClient(api_key=os.environ["INTTEGRO_API_KEY"])

result = client.upload_requests.fulfill(
    upload_url="<UPLOAD_URL>",
    file="./evidence.pdf",
)
PHPphp
<?php

use Inttegro\Client;

$client = new Client($_ENV['INTTEGRO_API_KEY']);
$result = $client->uploadRequests->fulfill([
    'upload_url' => '<UPLOAD_URL>',
    'file' => './evidence.pdf',
]);
Rubyruby
require "inttegro"

client = Inttegro::Client.new(api_key: ENV.fetch("INTTEGRO_API_KEY"))
result = client.upload_requests.fulfill(
  upload_url: "<UPLOAD_URL>",
  file: "./evidence.pdf"
)
Javajava
import com.inttegro.Client;
import com.inttegro.files.UploadRequestFulfillParams;

public class Example {
  public static void main(String[] args) throws Exception {
    var client = new Client(System.getenv("INTTEGRO_API_KEY"));
    var params = UploadRequestFulfillParams.builder()
      .uploadUrl("<UPLOAD_URL>")
      .file("./evidence.pdf")
      .build();
    var result = client.uploadRequests().fulfill(params);
  }
}
C#csharp
using Inttegro;

using var inttegro = new InttegroClient(
    Environment.GetEnvironmentVariable("INTTEGRO_API_KEY")!
);
var result = await inttegro.UploadRequests.FulfillAsync(new {
    upload_url = "<UPLOAD_URL>",
    file = "./evidence.pdf",
});

Lookup an upload request POST /upload_requests/lookup

Retrieve an upload request when you need its current status or the result of the uploader’s latest attempt. After fulfillment, fileId identifies the file Inttegro created.

Request body

  • #idstringrequired

    Upload-request ID to retrieve.

Response

Returns the upload request and its latest attempt, when one exists. The response does not include uploadUrl; retain that URL only for as long as the intended uploader needs it.

Request

POST/upload_requests/lookup
cURLbash
curl https://api.inttegro.com/upload_requests/lookup \
-H "Authorization: Bearer $INTTEGRO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"id":"uplreq_1gK9pQ4vL8mN2sT5wX7yZ0"}'
TypeScripttypescript
import { InttegroClient } from '@inttegro/inttegro-sdk'

const inttegro = new InttegroClient({
  apiKey: process.env.INTTEGRO_API_KEY!,
})

const result = await inttegro.uploadRequests.lookup({
  id: "uplreq_1gK9pQ4vL8mN2sT5wX7yZ0",
})
Gogo
package main

import (
  "context"
  "log"
  "os"

  inttegro "github.com/inttegro/inttegro-sdk-go/v14"
)

func main() {
  ctx := context.Background()
  client := inttegro.NewClient(os.Getenv("INTTEGRO_API_KEY"))

  result, err := client.UploadRequests.Lookup(ctx, "uplreq_1gK9pQ4vL8mN2sT5wX7yZ0")
  if err != nil {
    log.Fatal(err)
  }
  _ = result
}
Pythonpython
import os

from inttegro import InttegroClient

client = InttegroClient(api_key=os.environ["INTTEGRO_API_KEY"])

result = client.upload_requests.lookup("uplreq_1gK9pQ4vL8mN2sT5wX7yZ0")
PHPphp
<?php

use Inttegro\Client;

$client = new Client($_ENV['INTTEGRO_API_KEY']);
$result = $client->uploadRequests->lookup("uplreq_1gK9pQ4vL8mN2sT5wX7yZ0");
Rubyruby
require "inttegro"

client = Inttegro::Client.new(api_key: ENV.fetch("INTTEGRO_API_KEY"))
result = client.upload_requests.lookup(id: "uplreq_1gK9pQ4vL8mN2sT5wX7yZ0")
Javajava
import com.inttegro.Client;

public class Example {
  public static void main(String[] args) throws Exception {
    var client = new Client(System.getenv("INTTEGRO_API_KEY"));
    var result = client.uploadRequests().lookup("uplreq_1gK9pQ4vL8mN2sT5wX7yZ0");
  }
}
C#csharp
using Inttegro;

using var inttegro = new InttegroClient(
    Environment.GetEnvironmentVariable("INTTEGRO_API_KEY")!
);
var result = await inttegro.UploadRequests.LookupAsync("uplreq_1gK9pQ4vL8mN2sT5wX7yZ0");

Review an upload attempt POST /upload_requests/review

Approve or reject the latest upload attempt after your application has checked the file itself—for example, after confirming that a document is readable or contains the requested evidence. Approval keeps a successful request fulfilled. Rejection reopens it for a replacement when another attempt is available.

Request body

Only the latest attempt can be reviewed. You can approve only a successful attempt, and you cannot review a canceled or expired request. Use publicMessage and reasons for explanations that are safe to show to the uploader.

Response

Returns the updated upload request with the reviewed attempt. Use an idempotency key when submitting a review so a retry cannot record the decision twice.

Request

POST/upload_requests/review
cURLbash
curl https://api.inttegro.com/upload_requests/review \
  -H "Authorization: Bearer $INTTEGRO_API_KEY" \
  -H "Idempotency-Key: review-upload-attempt-001" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "uplreq_1gK9pQ4vL8mN2sT5wX7yZ0",
    "attempt_ordinal": 1,
    "decision": "rejected",
    "reasons": [{
      "code": "document_unreadable",
      "message": "The document is too blurry to read."
    }],
    "public_message": "Please upload a clearer copy."
  }'
TypeScripttypescript
import { InttegroClient, UploadReviewDecisions } from '@inttegro/inttegro-sdk'

const inttegro = new InttegroClient({
  apiKey: process.env.INTTEGRO_API_KEY!,
})

const result = await inttegro.uploadRequests.review({
  id: "uplreq_1gK9pQ4vL8mN2sT5wX7yZ0",
  attemptOrdinal: 1,
  decision: UploadReviewDecisions.Rejected,
  reasons: [
    {
      code: "document_unreadable",
      message: "The document is too blurry to read.",
    },
  ],
  publicMessage: "Please upload a clearer copy.",
}, {
  idempotencyKey: "review-upload-attempt-001",
})
Gogo
package main

import (
  "context"
  "log"
  "os"

  inttegro "github.com/inttegro/inttegro-sdk-go/v14"
  "github.com/inttegro/inttegro-sdk-go/v14/request"
  "github.com/inttegro/inttegro-sdk-go/v14/uploadrequest"
)

func main() {
  ctx := context.Background()
  client := inttegro.NewClient(os.Getenv("INTTEGRO_API_KEY"))

  params := uploadrequest.ReviewParams{
    ID: "uplreq_1gK9pQ4vL8mN2sT5wX7yZ0",
    AttemptOrdinal: 1,
    Decision: string(uploadrequest.ReviewDecisionRejected),
    Reasons: []uploadrequest.ReviewReason{
      {
        Code: "document_unreadable",
        Message: "The document is too blurry to read.",
      },
    },
    PublicMessage: "Please upload a clearer copy.",
  }
  result, err := client.UploadRequests.Review(ctx, params, request.WithIdempotencyKey("review-upload-attempt-001"))
  if err != nil {
    log.Fatal(err)
  }
  _ = result
}
Pythonpython
import os

import inttegro
from inttegro import InttegroClient

client = InttegroClient(api_key=os.environ["INTTEGRO_API_KEY"])

result = client.upload_requests.review(inttegro.upload_request.ReviewAttemptByOrdinalRequest(
  id="uplreq_1gK9pQ4vL8mN2sT5wX7yZ0",
  attempt_ordinal=1,
  decision=inttegro.upload_request.ReviewDecision.REJECTED,
  reasons=[
    inttegro.upload_request.ReviewReasonInput(
      code="document_unreadable",
      message="The document is too blurry to read.",
    ),
  ],
  public_message="Please upload a clearer copy.",
),
    idempotency_key="review-upload-attempt-001")
PHPphp
<?php

use Inttegro\Client;

$client = new Client($_ENV['INTTEGRO_API_KEY']);
$result = $client->uploadRequests->review([
  'id' => 'uplreq_1gK9pQ4vL8mN2sT5wX7yZ0',
  'attempt_ordinal' => 1,
  'decision' => \Inttegro\UploadReviewDecision::Rejected,
  'reasons' => [
    [
      'code' => 'document_unreadable',
      'message' => 'The document is too blurry to read.',
    ],
  ],
  'public_message' => 'Please upload a clearer copy.',
], [
    'idempotency_key' => "review-upload-attempt-001",
]);
Rubyruby
require "inttegro"

client = Inttegro::Client.new(api_key: ENV.fetch("INTTEGRO_API_KEY"))
result = client.upload_requests.review(
  id: "uplreq_1gK9pQ4vL8mN2sT5wX7yZ0",
  attempt_ordinal: 1,
  decision: Inttegro::UploadReviewDecision::REJECTED,
  reasons: [
    {
      code: "document_unreadable",
      message: "The document is too blurry to read.",
    },
  ],
  public_message: "Please upload a clearer copy.",
  idempotency_key: "review-upload-attempt-001"
)
Javajava
import com.inttegro.Client;
import com.inttegro.files.ReviewUploadRequestAttemptByOrdinalParams;
import com.inttegro.files.UploadRequestReviewDecision;
import java.util.List;
import com.inttegro.files.UploadRequestReviewReason;
import com.inttegro.RequestOptions;

public class Example {
  public static void main(String[] args) throws Exception {
    var client = new Client(System.getenv("INTTEGRO_API_KEY"));
    var params = ReviewUploadRequestAttemptByOrdinalParams.builder()
      .id("uplreq_1gK9pQ4vL8mN2sT5wX7yZ0")
      .attemptOrdinal(1L)
      .decision(UploadRequestReviewDecision.REJECTED)
      .reasons(List.of(
          UploadRequestReviewReason.builder()
            .code("document_unreadable")
            .message("The document is too blurry to read.")
            .build()
        ))
      .publicMessage("Please upload a clearer copy.")
      .build();
    var result = client.uploadRequests().review(params, RequestOptions.withIdempotencyKey("review-upload-attempt-001"));
  }
}
C#csharp
using Inttegro;

using var inttegro = new InttegroClient(
    Environment.GetEnvironmentVariable("INTTEGRO_API_KEY")!
);
var result = await inttegro.UploadRequests.ReviewAsync(new Inttegro.ReviewUploadRequestAttemptByOrdinalRequest {
  Id = "uplreq_1gK9pQ4vL8mN2sT5wX7yZ0",
  AttemptOrdinal = 1,
  Decision = "rejected",
  Reasons = new List<Inttegro.UploadRequestReviewReason> {
    new Inttegro.UploadRequestReviewReason {
      Code = "document_unreadable",
      Message = "The document is too blurry to read.",
    },
  },
  PublicMessage = "Please upload a clearer copy.",
}, "review-upload-attempt-001");

Page upload requests POST /upload_requests/page

List upload requests when you need to find outstanding uploads, recent fulfillments, or requests associated with a particular order, product, case, or other resource.

Request body

TypeScript SDK requestUploadRequestPageRequestv15.0.0

Response

Returns a page with uploadRequests, number, and size. Page items omit the latest attempt; use Lookup an upload request when you need an attempt or its validation error. An empty page has an empty uploadRequests collection and size set to 0.

Request

POST/upload_requests/page
cURLbash
curl https://api.inttegro.com/upload_requests/page \
-H "Authorization: Bearer $INTTEGRO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"purpose":"support_document","status":"pending","page_number":1,"page_size":25}'
TypeScripttypescript
import { InttegroClient } from '@inttegro/inttegro-sdk'

const inttegro = new InttegroClient({
  apiKey: process.env.INTTEGRO_API_KEY!,
})

const result = await inttegro.uploadRequests.page({
  purpose: "support_document",
  status: "pending",
  pageNumber: 1,
  pageSize: 25,
})
Gogo
package main

import (
  "context"
  "log"
  "os"

  inttegro "github.com/inttegro/inttegro-sdk-go/v14"
  "github.com/inttegro/inttegro-sdk-go/v14/uploadrequest"
)

func main() {
  ctx := context.Background()
  client := inttegro.NewClient(os.Getenv("INTTEGRO_API_KEY"))

  params := uploadrequest.PageParams{
    Purpose: "support_document",
    Status: "pending",
    PageNumber: 1,
    PageSize: 25,
  }
  result, err := client.UploadRequests.Page(ctx, params)
  if err != nil {
    log.Fatal(err)
  }
  _ = result
}
Pythonpython
import os

import inttegro
from inttegro import InttegroClient

client = InttegroClient(api_key=os.environ["INTTEGRO_API_KEY"])

result = client.upload_requests.page(inttegro.upload_request.PageRequest(
  purpose="support_document",
  status="pending",
  page_number=1,
  page_size=25,
))
PHPphp
<?php

use Inttegro\Client;

$client = new Client($_ENV['INTTEGRO_API_KEY']);
$result = $client->uploadRequests->page([
  'purpose' => 'support_document',
  'status' => 'pending',
  'page_number' => 1,
  'page_size' => 25,
]);
Rubyruby
require "inttegro"

client = Inttegro::Client.new(api_key: ENV.fetch("INTTEGRO_API_KEY"))
result = client.upload_requests.page(
  purpose: "support_document",
  status: "pending",
  page_number: 1,
  page_size: 25
)
Javajava
import com.inttegro.Client;
import com.inttegro.files.UploadRequestPageParams;
import com.inttegro.files.UploadRequestStatus;

public class Example {
  public static void main(String[] args) throws Exception {
    var client = new Client(System.getenv("INTTEGRO_API_KEY"));
    var params = UploadRequestPageParams.builder()
      .purpose("support_document")
      .status(UploadRequestStatus.PENDING)
      .pageNumber(1)
      .pageSize(25)
      .build();
    var result = client.uploadRequests().page(params);
  }
}
C#csharp
using Inttegro;

using var inttegro = new InttegroClient(
    Environment.GetEnvironmentVariable("INTTEGRO_API_KEY")!
);
var result = await inttegro.UploadRequests.PageAsync(new {
  purpose = "support_document",
  status = "pending",
  page_number = 1,
  page_size = 25,
});

Cancel an upload request POST /upload_requests/cancel

Cancel a request when you no longer need the file or when you have issued a replacement link. Its upload URL stops working immediately.

Request body

TypeScript SDK requestUploadRequestCancelRequestv15.0.0

Response

Returns the request with status set to Inttegro.UploadRequestStatuses.Canceled. Use a stable idempotency key when retrying the cancellation.

Request

POST/upload_requests/cancel
cURLbash
curl https://api.inttegro.com/upload_requests/cancel \
-H "Authorization: Bearer $INTTEGRO_API_KEY" \
-H "Idempotency-Key: cancel-upload-request-001" \
-H "Content-Type: application/json" \
-d '{
"id": "uplreq_1gK9pQ4vL8mN2sT5wX7yZ0",
"canceled_by": { "type": "user", "id": "usr_support_123" }
}'
TypeScripttypescript
import { InttegroClient } from '@inttegro/inttegro-sdk'

const inttegro = new InttegroClient({
  apiKey: process.env.INTTEGRO_API_KEY!,
})

const result = await inttegro.uploadRequests.cancel({
  id: "uplreq_1gK9pQ4vL8mN2sT5wX7yZ0",
  canceledBy: {
    type: "user",
    id: "usr_support_123",
  },
}, {
  idempotencyKey: "cancel-upload-request-001",
})
Gogo
package main

import (
  "context"
  "log"
  "os"

  inttegro "github.com/inttegro/inttegro-sdk-go/v14"
  "github.com/inttegro/inttegro-sdk-go/v14/filelink"
  "github.com/inttegro/inttegro-sdk-go/v14/request"
  "github.com/inttegro/inttegro-sdk-go/v14/uploadrequest"
)

func main() {
  ctx := context.Background()
  client := inttegro.NewClient(os.Getenv("INTTEGRO_API_KEY"))

  params := uploadrequest.CancelParams{
    ID: "uplreq_1gK9pQ4vL8mN2sT5wX7yZ0",
    CanceledBy: filelink.Actor{
      Type: "user",
      ID: "usr_support_123",
    },
  }
  result, err := client.UploadRequests.Cancel(ctx, params, request.WithIdempotencyKey("cancel-upload-request-001"))
  if err != nil {
    log.Fatal(err)
  }
  _ = result
}
Pythonpython
import os

import inttegro
from inttegro import InttegroClient

client = InttegroClient(api_key=os.environ["INTTEGRO_API_KEY"])

result = client.upload_requests.cancel(inttegro.upload_request.CancelRequest(
  id="uplreq_1gK9pQ4vL8mN2sT5wX7yZ0",
  canceled_by=inttegro.file.ActorInput(
    type="user",
    id="usr_support_123",
  ),
),
    idempotency_key="cancel-upload-request-001")
PHPphp
<?php

use Inttegro\Client;

$client = new Client($_ENV['INTTEGRO_API_KEY']);
$result = $client->uploadRequests->cancel([
  'id' => 'uplreq_1gK9pQ4vL8mN2sT5wX7yZ0',
  'canceled_by' => [
    'type' => 'user',
    'id' => 'usr_support_123',
  ],
]);
Rubyruby
require "inttegro"

client = Inttegro::Client.new(api_key: ENV.fetch("INTTEGRO_API_KEY"))
result = client.upload_requests.cancel(
  id: "uplreq_1gK9pQ4vL8mN2sT5wX7yZ0",
  canceled_by: {
    type: "user",
    id: "usr_support_123",
  },
  idempotency_key: "cancel-upload-request-001"
)
Javajava
import com.inttegro.Client;
import com.inttegro.files.UploadRequestCancelParams;
import com.inttegro.files.Actor;
import com.inttegro.RequestOptions;

public class Example {
  public static void main(String[] args) throws Exception {
    var client = new Client(System.getenv("INTTEGRO_API_KEY"));
    var params = UploadRequestCancelParams.builder()
      .id("uplreq_1gK9pQ4vL8mN2sT5wX7yZ0")
      .canceledBy(Actor.builder()
          .type("user")
          .id("usr_support_123")
          .build())
      .build();
    var result = client.uploadRequests().cancel(params, RequestOptions.withIdempotencyKey("cancel-upload-request-001"));
  }
}
C#csharp
using Inttegro;

using var inttegro = new InttegroClient(
    Environment.GetEnvironmentVariable("INTTEGRO_API_KEY")!
);
var result = await inttegro.UploadRequests.CancelAsync(new {
  id = "uplreq_1gK9pQ4vL8mN2sT5wX7yZ0",
  canceled_by = new {
    type = "user",
    id = "usr_support_123",
  },
}, "cancel-upload-request-001");

Type to search…

↑↓ navigate↵ selectEsc close