For the complete documentation index, see llms.txt. This page is also available as Markdown.

File

Generate signed URL for file uploads.

post

This endpoint generates pre-signed URLs for uploading shipment-related files directly to S3.

Use this endpoint before calling shipment purchase when you need to attach supporting files.

Important shipment guidance:

  • For shipments going to European countries, invoice documents are required.

  • Item photos are optional, but recommended for all destinations (including non-European shipments).

Typical flow:

  1. Request signed URLs with this endpoint.

  2. Upload each file directly to S3 using the returned upload_url.

  3. Send the returned s3_key values in shipment endpoints (eg. documents_s3_key, photos_s3_key).

Authorizations
AuthorizationstringRequired

Base64-encoded public_key:private_key value.

Header parameters
X-Shipment-Modestring · enumRequired

Required shipment mode. Use SFN for shipping from Nigeria or STN for shipping to Nigeria.

Example: SFNPossible values:
Body
filesstring[]Required

List of files you want to upload. Include one object per file. For invoice uploads, use documents/invoice. For item photos, use images/items.

Example: [{"extension":"pdf","mime_type":"application/pdf","folder":"documents/invoice"},{"extension":"jpg","mime_type":"image/jpeg","folder":"images/items"}]
Responses
200Success
application/json
successbooleanOptionalExample: true
status_codeintegerOptionalExample: 200
messagestringOptionalExample: Signed URLs generated successfully
post/api/v1/file/generate
POST /api/v1/file/generate HTTP/1.1
Host: api-sandbox.africaniestest.com
Authorization: YOUR_API_KEY
X-Shipment-Mode: SFN
Content-Type: application/json
Accept: */*
Content-Length: 159

{
  "files": [
    {
      "extension": "pdf",
      "mime_type": "application/pdf",
      "folder": "documents/invoice"
    },
    {
      "extension": "jpg",
      "mime_type": "image/jpeg",
      "folder": "images/items"
    }
  ]
}
{
  "success": true,
  "status_code": 200,
  "message": "Signed URLs generated successfully",
  "data": [
    {
      "file_name": "b74cb57c-1b7d-4579-8c6b-bb550f38554f",
      "upload_url": "https://s3.amazonaws.com/bucket/path?X-Amz-Algorithm=...",
      "s3_key": "documents/invoice/b74cb57c-1b7d-4579-8c6b-bb550f38554f.pdf"
    }
  ]
}

Last updated