Billing operations

With GET /billing/billing-entries you will retrieve list of billing operations and balance of the authorized user.

By default, you will retrieve list of 100 billing entries, where the first result is the newest. You can adjust the list to your needs using the following parameters:

  • limit - define a number of returned billing entries, max value is 100,

  • offset - define an index of first returned billing entry.

e.g. GET /billing/billing-entries?limit=50&offset=25 will return 50 billing entries from defined point.

You can also use filters:

  • date of the billing operation - you can filter billing entries date using parameters:

    • occurredAt.gte (minimum date and time when the billing operation occured in ISO 8601 format),

    • occurredAt.lte (maximum date and time when the billing operation occured in ISO 8601 format),

e.g. GET /billing/billing-entries?occurredAt.gte=2019-07-10T11:06:50.935Z&occurredAt.lte=2019-07-15T11:06:50.935Z,

  • type of the billing operation - check, which type.id is associated with name.id (name of the operation) - detailed list of available billing entries types you can retrieve by GET /billing/billing-types. Pass type.id as a parameter value to get the results you are interested in, e.g. GET /billing/billing-entries?type.id=SUC will return all results that relate to sales commision,

  • offer id - e.g. GET /billing/billing-entries?offer.id=8566354406 - will return all billing operations associated with the passed offer.


Sample request:

 
  curl -X GET
  https://api.allegro.pl/billing/billing-entries?occurredAt.gte=2019-10-10T00:00:00.000Z&occurredAt.lte=2019-10-10T23:59:59.000Z
  -H ‘Authorization: Bearer {token}’ /
  -H ‘Accept: application/vnd.allegro.public.v1+json’ /
  -H ‘Content-Type: application/vnd.allegro.public.v1+json’
 

Sample response:

 
  {
    "billingEntries": [
        {
            "id": "da74ef80-f97a-4b04-a748-4c129cfb94b8",   -- billing entry ID
            "occurredAt": "2019-10-10T10:27:17.412Z",       -- date of billing entry
            "type": {
                "id": "LIS",                                -- three-letter code of the billing type
                "name": "Wystawienie przedmiotu"            -- name of the billing type
            "offer": {
                "id": "6206586563",                         -- offer ID
                "name": "oferta testowa"                    -- offer title
            },
            "value": {
                "amount": "-1.00",
                "currency": "PLN"
            },
            "tax": {
                "percentage": "0",                          -- tax rate
                 "annotation": "EXEMPT"                     -- additional field - returned if the
                                                            billing entry is exempt from tax
                                                            (“EXEMPT”)  or tax is not applicable
                                                            ("NOT_APPLICABLE")
            },
            "balance": {
                "amount": "-737.57",                        -- balance after the operation
                "currency": "PLN"
            }
        }
    ]
  }
 

Payment operations

With GET /payments/payment-operations you will retrieve list of payment operations of the authorized user.

By default, you will retrieve list of 100 billing entries, where the first result is the newest. You can adjust the list to your needs using the following parameters:

  • limit - define a number of returned payment operations, max value is 100,

  • offset - define an index of first returned payment operation.

You can also use filters:

  • date of the payment operation - you can filter billing entries date using parameters:

    • occurredAt.gte (minimum date and time when the payment operation occured in ISO 8601 format)

    • occurredAt.lte (maximum date and time when the payment operation occured in ISO 8601 format),

e.g. GET /payments/payment-operations ?occurredAt.gte=2019-07-10T11:06:50.935Z&occurredAt.lte=2019-07-15T11:06:50.935Z,

  • payment id - e.g. GET /payments/payment-operations?payment.id=ca3871d1-ec01-11e9-bc5f-3de157f9f689,

  • buyer’s login - e.g. GET /payments/payment-operations?participant.login=participant. In case of REFUND_INCREASE operation this is the login of the seller, in other cases, of the buyer.

  • group of operation types - e.g. GET /payments/payment-operations?group=INCOME. Allowed values are: INCOME, OUTCOME lub REFUND,

  • payment operator - e.g. GET /payments/payment-operations?wallet.operator=PAYU,

  • availability for payout - e.g. GET /payments/payment-operations?wallet.type=AVAILABLE will return operations available for payout, value WAITING means it is temporarily suspended for payout.


Sample request:

 
  curl -X GET
  https://api.allegro.pl/payments/payment-operations?group=INCOME&limit=1
  -H ‘Authorization: Bearer {token}’ /
  -H ‘Accept: application/vnd.allegro.public.v1+json’ /
  -H ‘Content-Type: application/vnd.allegro.public.v1+json’
 

Sample response:

 
  {
    "paymentOperations": [
        {
            "type": "CONTRIBUTION",                             -- type of the operation
            "group": "INCOME",                                  -- operation type group
            "wallet": {
                "paymentOperator": "PAYU",                      -- payment operator
                "type": "AVAILABLE",                            -- availability for payout
                "balance": {
                    "amount": "3297.81",                        -- balance after the operation
                    "currency": "PLN"
                }
            },
            "occurredAt": "2019-10-11T08:33:40.650Z",           -- date of the operation
            "value": {
                "amount": "144.00",
                "currency": "PLN"
            },
            "payment": {
                "id": "ca3871d1-ec01-11e9-bc5f-3de157f9f689"    -- payment id
            },
            "participant": {                                    -- buyer’s details
                "id": "44182721",
                "companyName": "Allegro.pl Sp. z o.o.",
                "login": "exampleLogin",
                "firstName": "",
                "lastName": "",
                "address": {
                    "street": "Grunwaldzka 1822",
                    "city": "Poznań",
                    "postCode": "60-166"
                }
            }
        }
    ],
    "count": 1,                                                 -- visible results
    "totalCount": 31                                            -- available results
  }         

 

Fee calculator

Fee calculator allows Sellers to check the fees charged in selected categories. The REST API fee calculator returns data to a logged-in User. To check the fees we charge in a given category, we have prepared the following resource in the REST API Allegro:


Sample request:

 
  curl -X POST \
  https://api.allegro.pl/pricing/fee-preview \
  -H 'Accept: application/vnd.allegro.public.v1+json' \
  -H 'Content-Type: application/vnd.allegro.public.v1+json'  \
  -H 'Authorization: Bearer {token}' \
  -H 'Accept-Language: PL' \
  -d '{
  "includeQuotingBundles": true,                -- not required, include Discount Center packages
  "offer": {
    "category": {
      "id": "250442"                            -- required, category ID
    },
    "condition": "NEW",                         -- not required, parameter, supported values:
                                                "NEW", "USED", "OTHER"
    "duration": "PT720H",                       -- required, offer duration, supported values:
                                                PT72H, PT120H, PT168H, PT240H, PT336H, PT480H, PT720H
    "numberOfBigPhotos": 3,                     -- not required, number of large photos
    "numberOfPhotos": 3,                        -- not required, number of photos
    "quantity": 5,                              -- not required, number of items in offer
    "shop": true,                               -- not required, sales method: shop or other
    "soldQuantity": 1,                          -- not required, number of items sold
    "type": "shop",                             -- required, sales method, supported values:
                                                SHOP, OFFER, ADVERTISEMENT
    "unitPrice": 131,                           -- required, unit price - integer
    "bold": true,                               -- not required, bold
    "highlight": true,                          -- not required, highlight
    "departmentPage": true,                     -- not required, category page
    "emphasized": true,                         -- not required, featuring
    "emphasizedHighlightBoldPackage": true,     -- not required, package
    "multiVariant": true                        -- not required, multiVariant offer,
                                                supported values: “true”, “false”
   }
  }'
 

Click to view sample response:
{

  {
    "quotes": [
        {
            "type": "listingFee",                       -- type of fees
            "name": "Opłata za wystawienie",            -- name of the fee
            "fee": {                                    -- amount in PLN
                "amount": "0.00",
                "currency": "PLN"
            },
            "cycleDuration”: “PT240H”                   -- information in what cycles
                                                        we will charge the fee
        },
        {
            "type": "highlightFee",
            "name": "Podświetlenie (sklep)",
            "fee": {
                "amount": "9.00",
                "currency": "PLN"
            },
            "cycleDuration": "PT240H"
        },
        {
            "type": "distinctionFee",
            "name": "Opłata za wyróżnienie (sklep)",
            "fee": {
                "amount": "19.00",
                "currency": "PLN"
            },
            "cycleDuration": "PT240H"
        },
        {
            "type": "departmentPageFee",
            "name": "Opłata za promowanie na stronie działu",
            "fee": {
                "amount": "29.00",
                "currency": "PLN"
            },
            "cycleDuration": "PT240H"
        },
        {
            "type": "boldHighlightDistinctionFee",
            "name": "Pakiet Wyróżnienie + Pogrubienie + Podświetlenie (sklep)",
            "fee": {
                "amount": "29.00",
                "currency": "PLN"
            },
            "cycleDuration": "PT240H"
        },
        {
            "type": "boldFee",
            "name": "Oplata za pogrubienie (sklep)",
            "fee": {
                "amount": "9.00",
                "currency": "PLN"
            },
            "cycleDuration": "PT240H"
        }
    ],
    "commissions": [                                    -- commissions
        {
            "type": "commissionFee",                    -- types of fees
            "name": "Prowizja od sprzedaży (sklep)",    -- name
            "fee": {                                    -- amount in PLN
                "amount": "10.48",
                "currency": "PLN"
            }
        },
        {
            "type": "commissionFeatureFee",
            "name": "Prowizja od sprzedaży oferty wyróżnionej",
            "fee": {
                "amount": "4.20",
                "currency": "PLN"
            }
        }
    ]
}

Check when a fee is charged

As of August 2017, fees will be charged every 10 days. Therefore, we provide you with a resource that will help you check when a fee is charged.

  • GET /pricing/offer-quotes - is a resource that you can check when a given cycle ends and we charge another fee. You must be logged in as a seller who listed the offers.


Note! You can provide up to 20 offer numbers.


Sample request:

 
  curl -X GET \
  'https://api.allegro.pl/pricing/offer-quotes?offer.id=7617492560,7794910978' \
  -H 'Accept: application/vnd.allegro.public.v1+json' \
  -H 'Accept-Language: PL' \
  -H 'Authorization: Bearer {token}' \
 

Click to view sample response:
{
    "count": 3,                                         -- number of fees
    "quotes": [
        {
            "type": "LISTING",                          -- fee type, at present following values
                                                           LISTING,
                                                           BOLD,
                                                           HIGHLIGHT,
                                                           EMPHASIZED,
                                                           EMPHASIZED_HIGHLIGHT_BOLD_PACKAGE,
                                                           DEPARTMENT_PAGE, MIN_PRICE,
                                                           BARGAIN
                                                           INEFFECTIVE_LISTING_FEE
            "name": "Wystawienie",                      -- fee name, at present following
                                                        values are available:
                                                           Wystawienie,
                                                           Pogrubienie,
                                                           Podświetlenie,
                                                           Wyróżnienie,
                                                           Pakiet promo,
                                                           Strona działu,
                                                           Cena minimalna,
                                                           Okazja
                                                           Utrzymaniowa
            "nextDate": "2019-01-24T15:41:33.112Z",     -- date of charging a listing fee
            "fee": {
                "amount": "0.00",                       -- amount to be charged
                "currency": "PLN"                       -- currency
            },
            "offer": {                                  -- offer subject to payment
                "id": "7617492560"                      -- offer ID
            },
            "enabled": true                             -- fee status
        },
        {
            "type": "EMPHASIZED",
            "name": "Wyróżnienie",
            "nextDate": "2019-02-01T09:50:05.135Z",
            "fee": {
                "amount": "19.00",
                "currency": "PLN"
            },
            "offer": {
                "id": "7794910978"
            },
            "enabled": true
        },
        {
            "type": "LISTING",
            "name": "Wystawienie",
            "nextDate": "2019-02-01T09:50:05.135Z",
            "fee": {
                "amount": "0.00",
                "currency": "PLN"
            },
            "offer": {
                "id": "7794910978"
            },
            "enabled": true
        }
    ]
}