Skip to main content

Documentation Portal

Fixed Prices Upload via API

The Upload Fixed Prices API lets you upload your list of fixed prices to Global-e. In addition, you can check the upload status and retrieve the error file.

Prerequisites

Prepare your CSV file containing your list of fixed prices and populate it.

Each column in your CSV file must have the following headers, respectively:

  • SKU, variant_id, country-code, price, compare_at_price.

  • Variant_id

  • Country-code

  • Price

  • Compare_at_price

Do not use commas as part of the values in the following fields: price and compare-at-price

For more information, see Set Up a New Price List.

Authentication: MerchantGUID

To implement API calls with Global-e the only required information is the merchantGUID provided by Global-e.

For authentication, make sure to include your Merchant GUID as part of each call or as part of the header so that Global-e can verify your identity. Make sure to use the appropriate merchantGUID, depending on the Global‑e integration environment used for development or production purposes. See Global-e Environments.

MerchantGUID in URL

Add your MerchantGUID as part of each API URL.

MerchantGUID as part of the header

Add your MerchantGUID as part of the header as illustrated below.

curl --location 'https://[globale domain]/[API]' \
--header 'MerchantGUID: D2ED2A7F-F6ED-4CCB-B611-B44AC8D02250' \
--header 'Content-Type: application/json' \
--data-raw '
Flow
  1. Call the UploadFile endpoint to upload your Fixed Prices CSV file to Global-e.

  2. Call the GetUploadedFileDetails to get the details of the file you uploaded and verify the Upload status.

  3. Call GetFileWithValidationErrors to retrieve the file containing the errors.

If previously configured, you can retrieve your configuration file, modify your price list, and re-upload it. However, note that the prices (data) are overwritten and a new RunId (Global-e ID) is created.

UploadFile

Upload your Fixed Price CSV File to Global-e.

PATH: https://<domain address>/PCE/UploadFile?merchantGUID=<Merchant GUID>

TYPE: POST

BODY:

<Fixed Price CSV File> (from data)

RESPONSE:

200 OK: 
      {
           RunId ": " b2b477e7 - 9e0e-4b07 - be89 - 2b9122788d6b "
      }

ERRORS:

HTTP Status Code

Message

Description

400

{ 
"Message": "CSV file contains rows with invalid
 data. Make sure the file has the correct format
 and contains the correct information.",

"Errors": [
",43416058200314,,PLN,201,201,400",
",43416058200314,FR,EUR,301,401,400"
  ]
}

This file has the wrong column format and/or values. Check the rows that returned the error.

400

"Only one file should be uploaded. Make sure to upload only one file."

This endpoint expects only one file per request.

400

"The uploaded file is empty and cannot be processed. Make sure to populate the file correctly."

The file is empty or did not load correctly.

400

"The format of the uploaded file is incorrect. Please upload a CSV file. Make sure to save your file to .csv format."

The uploaded file had the wrong extension.

500

"Failed to upload the file. Please contact Support."

This is an internal error. If it appears, please contact Support.

CUrl EXAMPLE:

curl--location--request POST 'https://<domain>.com/PCE/UploadFile?merchantGUID=<Guid>' \
--form '=@"/<Full Path Name>.csv"'
GetUploadedFileDetails

This endpoint returns the details of the uploaded file, including the upload completion status.

PATH: https://<domain address> /PCE/GetUploadedFileDetails?merchantGUID=<Merchant GUID>&runId=<GUID provided by Upload file endpoint>

TYPE: GET

RESPONSE:

200 OK:
{
    "RunId": "84f9929c-1ea1-4edd-bc56-c4ef73a92e88",
    "FileName": "[Ecommerce_Platform_Name]_QA_Artem_01.08.2023_06_all_valid.csv",
    "DateCreated": "2023-08-11T10:04:57.462022+00:00",
    "Status": "Completed",
    "HasErrors": false,
    "CompletionPercentage": 100
}

PARAMETERS:

Parameter

Type

Description

RunId

string

The Global-e file Id

Sample UID format: 84f9929c-1ea1-4edd-bc56-c4ef73a92e88

FileName

string

The file name given by the merchant in CSV format

DateCreated

string

The file upload date.

Status

string

Statuses:

Submitted: When the file is first uploaded, the status is set to "Submitted". (Submitted: 0%)

Processing: As the file is being uploaded, the status changes to Processing. (Example: Processing: 64%)

Completed: If the upload finishes without errors, the status changes to Complete. (Completed: 100%)

Failed: If the upload fails due to an error, the status changes to Failed. See Errors to troubleshoot the issues. (Failed: 0%)

HasErrors

bool

Whether the file upload has errors.

CompletionPercentage

Integer

Shows the progress of the file upload completion in per cent.

Note: The integer value is a number without the per cent symbol.

Example: "CompletionPercentage": 100

ERRORS:

HTTP Status Code

Message

Description

400

"Cannot find the information for the current runId!"

The application cannot find the upload with this RunId.

This can happen if the file did not upload correctly, the RunId is empty, or if the RunId has been modified.

Verify that your file has uploaded correctly and returns a valid RunId.

500

"Failed to get the uploaded file’s {runId} for PCE.”

Unexpected internal error during file upload. Please contact Support.

PCE: Price Calculation Engine

GetFileWithValidationErrors

This endpoint always returns a CSV file with the headers. If there are errors, the file contains the rows where errors were identified.

PATH: https://<domain address> /PCE/GetFileWithValidationErrors?merchantGUID=<Merchant GUID>&runId=<GUID provided by Upload file endpoint>

TYPE: GET

RESPONSE:

          200 OK:
          File (application/octet-stream)

ERRORS:

HTTP Status Code

Message

Description

400

"Cannot find the information for the current runId!"

The application cannot find the upload with this RunId.

This can happen if the file did not upload correctly, the RunId is empty, or if the RunId has been modified.

Verify that your file has uploaded correctly and returns a valid RunId.

400

"Failed to get the validated file containing the rows with errors for PCE."

Unexpected internal error during file upload. Please contact Support.

PCE: Price Calculation Engine

Set up a New Price List

The following procedure details the steps required to set up a new list of fixed prices and upload it to Global-e.

Step 1. Prepare your CSV File with your Price List

In your CSV file, make sure to name the columns headers A through F, as shown below:

Column Headers
Field Descriptions and Requirements

Headers / Fields

Description

SKU

Enter the Product SKU as it appears in your product catalog. The SKU may not include spaces.

If this field is empty, the Variant ID field must be populated.

Variant ID

Enter the Product Variant ID, as assigned in your product catalog.

If this field is empty, the SKU field must be populated.

country_code

Enter the ISO-2 country code to indicate the country relevant to this price.

For instance, DE (Germany), US (USA).

If this field is empty, the currency_code field must be populated.

currency_code

Enter the 3-char currency code (ISO-4271) to indicate the currency relevant for this change.

For instance, USD (US dollar), AUD (Australian dollar), EUR (Euro), CHF (Swiss franc), and more.

If this field is empty, the country_code field must be populated.

price

Enter a fixed price value for the product. This value can only contain numbers.

Caution

Do not include commas in the prices you list in the CSV file as the prices will not parse correctly.

Keep empty to remove a previously set fixed price without setting a new one. In this case, the dynamic price conversion rules set for the current country apply.

compare_at_price

Enter fixed price value of the product before discount. This value can only contain numbers.

Caution

Do not include commas in the prices you list in the CSV file as the prices will not parse correctly.

Keep empty to remove a previously set fixed price without setting a new one. In this case, the dynamic price conversion rules set for the current country apply.

Step 2. Populate your CSV File

Note

When enabling editing in your CSV file, your security settings may change the CSV file format to Excel. Make sure to save your file back to CSV before uploading it to Global-e.

To populate your CSV file:

  1. Add your list of products, one product per row with the relevant information in the relevant column, according to the Field Descriptions and Requirements detailed in Step 1. Prepare your CSV File with your Price List.

    To ensure optimal accuracy, make sure to use the following values when populating fixed price data in your CSV file.

    Caution

    Do not include commas in the prices you list in the CSV file as the prices will not parse correctly.

    • Price per country and currency:

      Header: sku,variant_id,country_code,currency_code,price,compare_at_price
      Value: {{sku}},{{variant_id}},DE,EUR,6,6    

      OR (based on variant_id):

      Header: sku,variant_id,country_code,currency_code,price,compare_at_price
      Value: ,{{variant_id}},DE,EUR,6,6
    • Price per currency (affects all countries with the same currency):

      Header: sku,variant_id,country_code,currency_code,price,compare_at_price
      Value: {{sku}},{{variant_id}},,EUR,6,6       

      OR (based on variant_id):

      Header: sku,variant_id,country_code,currency_code,price,compare_at_price
      Value: ,{{variant_id}},,EUR,6,6  
  2. When done, make sure to save your file as CSV.