1. Information about user

Use GET /me to retrieve user data, whose token is sent in the request.


Sample request:

 curl -X GET \
 ‘https://api.allegro.pl/me’ \
 -H ‘Accept: application/vnd.allegro.public.v1+json’\
 -H ‘Content-Type: application/vnd.allegro.public.v1+json’ 


Sample response:

 {
    "id": "12345678",				     
    "login": "test_account",			 
    "email": "test_account@allegro.pl",	 
    "company": {
        "name": "Allegro.pl Sp. z o.o.", 
        "taxId": "123-123-12-12"		 
    }
 }

2. User’s ratings

How to retrieve user’s ratings data

Use GET /sale/user-ratings. In the response, you will receive the user’s ratings data, whose token is sent in the request. You can use additional parameters:

  • recommended - which take true or false value (positive or negative ratings). If you do not provide this parameter, we will return a list of all ratings by default;
  • limit - in which you indicate the number of ratings to be returned. We return 20 newest ratings by default, maximally 100;
  • offset - in which you specify from which rating we should return the data. The maximum value is 20000.


Sample request:

 curl -X GET \
 ‘https://api.allegro.pl/sale/user-ratings’ \
 -H ‘Accept: application/vnd.allegro.public.v1+json’ \
 -H ‘Content-Type: application/vnd.allegro.public.v1+json’ 


Sample response:

 {
    "ratings": [							
        {
            "id": "5f245afca39ce1004cb8fc37",			-- rating ID
            "createdAt": "2021-07-31T19:55:08.555",		-- rating creation datetime
            "recommended": true,					    -- whether buyer recommends the 
                                                        order
            "buyer": {						            -- buyer data
                "id": "33811291",					
                "login": "test_login"				
            },
            "comment": "Great contact, express delivery",    -- buyer comment
            "rates": {						            -- ratings of particular points
                "description": 5,					    -- description rate value
                "service": 5,						    -- service rate value
                "deliveryCost": 5					    -- delivery cost rate value
            },
            "order": {						            -- order data
                "id": "8b1664b2-c3bc-11ea-820a-db7a264e2a97",  
                "offers": [						        -- list of order offers
                    {
                        "id": "8481327606",				
                        "title": "oferta testowa",			
                        "snapshot": 			 		
"MjAyMC0wNy0xMVQyMToyMjozMS4yMjhaO2J1eWVyOzgxNDc5MTU2OTBhMjhmNmEzMGM5ZThjMDUzNmE2YTBhNTY1ZTAwMTY3YWI4NWQ3ODMzNWQ0NGM3ZDU4NjJmZjI%3D"
                    }
                ]
            },
            "removal": {						        -- information about requests 
								                        to remove user rating
                "possibleTo": "2021-08-13T19:55:08.555"	-- date until a removal request can
                                                        be submitted
            },
            "excludedFromAverageRates": false			-- whether this rating was not 
                                                        included in calculating average user 
                                                        rates
        }
    ]
 }

How to answer for user rating

For this purpose, use PUT /sale/user-ratings/{ratingId}/answer. As a ratingID provide ID of a specific rating - you can retrieve this value via GET /sale/user-ratings.


Sample request:

 curl -X PUT \ 
 'https://api.allegro.pl/sale/user-ratings/5f245afca39ce1004cb8fc37/answer' \
 -H 'Accept: application/vnd.allegro.public.v1+json' \
 -H 'Content-Type: application/vnd.allegro.public.v1+json' \
 -H 'Accept-Language: pl-PL'
 - d’{
  message": "In this case, it is the manufacturer's fault - please contact us by phone."  
                                    -- answer for user rating (maximally 500 characters)
 }’


Sample response:

 {
    "createdAt": "2021-08-02T19:55:08.555",
    "message": "In this case, it is the manufacturer's fault - please contact us by phone."  	
 }

How to send a request to remove user rating

Use PUT /sale/user-ratings/{ratingId}/removal. As a ratingID provide ID of a specific rating - you will receive both this value and the date by which you can send a request to remove the rating (possibleTo field) in the response for GET /sale/user-ratings.


Sample request:

 curl -X PUT \ 
 'https://api.allegro.pl/sale/user-ratings/5f245afca39ce1004cb8fc37/removal' \
 -H 'Accept: application/vnd.allegro.public.v1+json' \
 -H 'Content-Type: application/vnd.allegro.public.v1+json' \
 -H 'Accept-Language: pl-PL'
 - d’{
    "request": {
        "message": "According to our conversation please remove the rating"     
                                                -- user rating removal request  
                                                (maximally 500 characters)
    }
 }’


Sample response:

 {
    "request": {
        "createdAt": "2021-07-31T19:55:08.555",    -- date, from which the buyer has 14 days for 
                                                   rating removal
         "message": "According to our conversation please remove the rating."
    }
    "possibleTo": "2021-08-13T19:55:08.555"		   -- date until a removal request can
                                                   be submitted
 }

3. Offer terms

Return policies

How to add return policy information

Use POST /after-sales-service-conditions/return-policies to add new return policy. Provide in the request structure:

  • name - required, return policy name,
  • availability.range - required, buyer’s option to withdraw/terminate the agreement:
    • FULL - is possible,
    • RESTRICTED - not possible or restricted under selected condition,
  • availability.restrictionCause.name - required, if you choose RESTRICTED in the availability.range. You can find a list of available values with a description below. You can select one value only:
value The consumer cannot withdraw from an agreement without providing a reason when:
SEALED_MEDIA the buyer has removed sealed packaging of a sound, video recording or computer software (provision of the Act).
SEALED_ITEM_NO_RETURN_DUE_HEALTH_OR_HYGIENE the buyer has removed sealed packaging of an item which cannot be returned once the packaging has been removed for health-related or hygiene-related reasons (provision of the Act).
CUSTOM_ITEM buys a non-prefabricated product manufactured in accordance with their specification or to meet their individual needs (provision of the Act).
SHORT_SHELF_LIFE buys a perishable item or an item which has a short use by date (provision of the Act).
INSEPARABLY_LINKED where the objects of the service are items which, after delivery, due to their characteristics, remain inseparably linked with other items (provision of the Act).
ALCOHOL buys an alcoholic beverage, which may only be delivered after a lapse of 30 days and whose value depends on market fluctuations that are beyond the entrepreneur’s control (provision of the Act).
PRESS buys daily papers, periodicals or magazines (provision of the Act).
FULLY_IMPLEMENTED_SERVICE the service offered has been performed in full upon explicit consent of the buyer, who was advised before by the seller of the loss of the right to withdraw from the agreement (provision of the Act.
MEDICINAL_PRODUCT buys a medicinal product within the meaning of the pharmaceutical law – issued without a doctor’s prescription (provision of the Act).
BOOKED_SERVICE buys accommodation services other than for residential purposes, transport of things, car lease, catering, leisure, entertainment, sports or cultural events, if the agreement specifies the date or period of such service performance (provision of the Act).
NOT_RECORDED_DIGITAL_CONTENT digital content delivered to the customer, which is not saved on a durable media, if the service has commenced at the consumer’s express consent before the expiry of the deadline for withdrawing from the agreement, and after the seller has advised them of the loss of the right to withdraw from the agreement (provision of the Act).
  • withdrawalPeriod - required, if you choose FULL in the availability.range field. Specify the period when withdrawal is possible in ISO 8601 format. You can only provide days as value, e.g. “P14D”,
  • returnCost.coveredBy - required, if you choose FULL in the availability.range field. Defines who covers the cost of return shipment. Available values are SELLER or BUYER,
  • address - required, address for returns,
  • description - not required, additional information. You can use HTML tags: <p>, <b>, <ul>, <ol>, <li>. Other tags will be ignored.


Click to view sample request:
  curl -X POST 
'https://api.allegro.pl/after-sales-service-conditions/return-policies&#39;
-H 'Authorization: Bearer {token}'
-H 'Accept: application/vnd.allegro.public.v1+json'
-H 'Content-Type: application/vnd.allegro.public.v1+json' -d ‘{ "name": "Główne warunki zwrotu", – required, return policy name "availability": { – required, option to withdraw/terminate the agreement "range": "RESTRICTED", "restrictionCause": { "name": "NOT_RECORDED_DIGITAL_CONTENT" } }, "withdrawalPeriod": "P30D", – required, time period when withdrawal is possible "returnCost": { "coveredBy": "BUYER" – required, who covers the cost of return shipment }, "address": { – required, address for returns "name": "Testowa", "street": "100", "postCode": "61-132", "city": "Poznań", "countryCode": "PL" }, "description": – not required, additional information "<p>Can I return the product / withdraw from the contract? <b> Yes, if you bought the product as a consumer</b></p> <p> How much time do I have to return the product? 30 days after receiving the parcel</p>" }’

Click to view sample response:
 {
    "id": "a1552d88-2536-4fb3-8aea-7394266a4ea4",
    "seller": {
        "id": "6273997540"
    },
    "name": "Main return policy",
    "availability": {
        "range": "RESTRICTED",
        "restrictionCause": {
            "name": "NOT_RECORDED_DIGITAL_CONTENT",
            "description": "The consumer may not withdraw from an agreement without giving a reason when digital content delivered to the customer, which is not saved on a durable media, if the service has commenced at the consumer’s express consent before the expiry of the deadline for withdrawing from the agreement, and after the seller has advised them of the loss of the right to withdraw from the agreement (<a href=\"https://allegro.pl/pomoc/faq/tresci-cyfrowe-eyD2m0RA3Im\" target=\"_blank\">provision of the Act</a>)"
        }
    },
    "withdrawalPeriod": "P30D",
    "returnCost": {
        "coveredBy": "BUYER"
    },
    "attachment": {                                     -- statutory model withdrawal
                                                        agreement is automatically added
                                                        to each request
        "id": "d7be84bc-5408-42d2-8d0d-acf3ea02feba",
        "name": "Przykładowy formularz odstąpienia od umów.pdf",
        "url": "https://after-sales.allegrostatic.com/after-sales-service-d2/d7be84bc-5408-42d2-8d0d-acf3ea02feba"
    },
    "address": {
        "name": "Testowa",
        "street": "100",
        "postCode": "61-132",
        "city": "Poznań",
        "countryCode": "PL"
    },
    "description": "<p>Can I return the product / withdraw from the contract?
    <b> Yes, if you bought the product as a consumer</b></p>
    <p> How much time do I have to return the product?
    30 days after receiving the parcel</p>"
}

How to retrieve return policies assigned to the account

Via GET /after-sales-service-conditions/return-policies you can retrieve return policies assigned to your account. In the response you will receive a list of 60 return policies, which contains dentifier and the name of the return policy. You can adjust the list using filters:

  • limit - number of results in the response. The default and maximum value is 60,
  • offset - index of first returned result.

If you want to retrieve details of the return policy, provide their ID via GET /after-sales-service-conditions/return-policies/{returnPolicyId}.

Sample request:

  curl -X GET \
  'https://api.allegro.pl/after-sales-service-conditions/return-policies/bbbc9778-54f1-4dff-a9d4-c9067554390d' \
  -H 'Authorization: Bearer {token}' \
  -H 'Accept: application/vnd.allegro.public.v1+json' \
  -H 'Content-Type: application/vnd.allegro.public.v1+json' \
Click to view sample response:
 {
    "id": "a26da092-0e33-4b71-8a4a-e42592bad96a",
    "seller": {
        "id": "6279469754"
    },
    "name": "test2",
    "availability": {
        "range": "RESTRICTED",
        "restrictionCause": {
            "name": "SEALED_ITEM_NO_RETURN_DUE_HEALTH_OR_HYGIENE",
            "description": "The consumer cannot withdraw from an agreement without providing a reason when the buyer has removed sealed packaging of an item which cannot be returned once the packaging has been removed for health-related or hygiene-related reasons(<a href=&#34;https://allegro.pl/pomoc/faq/przedmioty-dostarczane-w-zapieczetowanym-opakowaniu-EYy4Vzom2uG&#34; target=&#34;_blank&#34;>provision of the Act</a>)."
        }
    },
    "withdrawalPeriod": "P1D",
    "returnCost": {
        "coveredBy": "SELLER"
    },
    "attachment": {
        "id": "d7be84bc-5408-42d2-8d0d-acf3ea02feba",
        "name": "Przykładowy formularz odstąpienia od umów.pdf",
        "url": "https://after-sales.allegrostatic.com/after-sales-service-d2/d7be84bc-5408-42d2-8d0d-acf3ea02feba&#34;
    },
    "address": {
        "name": "test",
        "street": "test",
        "postCode": "11-111",
        "city": "testowo",
        "countryCode": "PL"
    },
    "description": "<p>Can I return the product / withdraw from the contract? <b> Yes, if you bought the product as a consumer&#xa0;</b></p><p> How much time do I have to return the product? <b> 30 days after receiving the parcel</p>"
}

How to update return policy information

To update return policy information:

Click to view sample request:
 curl -X PUT \
'https://api.allegro.pl/after-sales-service-conditions/return-policies/bbbc9778-54f1-4dff-a9d4-c9067554390d' \
  -H 'Authorization: Bearer {token}' \
  -H 'Accept: application/vnd.allegro.public.v1+json' \
  -H 'Content-Type: application/vnd.allegro.public.v1+json' \
  -d ‘{
    "id": "bbbc9778-54f1-4dff-a9d4-c9067554390d",
    "seller": {
        "id": "6275799754"
    },
    "name": "Main return policy",
    "availability": {
        "range": "FULL",
        "restrictionCause": null
    },
    "withdrawalPeriod": "P30D",
    "returnCost": {
        "coveredBy": "SELLER"
    },
    "attachment": {                                     -- statutory model withdrawal
                                                        agreement is automatically added
                                                        to each request. You can’t change
                                                        this field.
        "id": "d7be84bc-5408-42d2-8d0d-acf3ea02feba",
        "name": "Przykładowy formularz odstąpienia od umów.pdf",
        "url": "https://after-sales.allegrostatic.com/after-sales-service-d2/d7be84bc-5408-42d2-8x0d-acf3ea02feba"
    },
    "address": {
        "name": "dluga ",
        "street": "100",
        "postCode": "61-132",
        "city": "Poznań",
        "countryCode": "PL"
    },
    "description": "<p>Czy mogę dokonać zwrotu produktu / odstąpić od umowy?
    <b>Tak, jeżeli kupiłeś produkt jako konsument&#xa0;</b></p>
    <p>Ile mam czasu na zwrot produktu? <b>30 dni od dnia otrzymania przesyłki</b></p>"
}’

Complaints policies

How to add complaints policy information

Use POST /after-sales-service-conditions/implied-warranties, to add new complaints policy. In the request structure, provide the fields:

  • name - required, complaints policy name,
  • individual.period - required, a time period when complaints policy for non-company customers is valid, specified in ISO 8601 format. You can only provide years as value, e.g. “P2Y”,
  • corporate.period - not required, a time period when complaints policy for company customers is valid, specified in ISO 8601 format. If you don’t want to provide it, pass null value,
  • address - required, address for complaints,
  • description - not required, description of complaints procedure. You can use HTML tags: <p>, <b>, <ul>, <ol>, <li>. Other tags will be ignored.
Click to view sample request:
  curl -X POST \
  'https://api.allegro.pl/after-sales-service-conditions/implied-warranties' \
  -H 'Authorization: Bearer {token}' \
  -H 'Accept: application/vnd.allegro.public.v1+json' \
  -H 'Content-Type: application/vnd.allegro.public.v1+json' \
  -d’{
    "name": "Main complaints policy",       -- required, complaints policy name
    "individual": {
        "period": "P1Y"                     -- required, a time period when
                                            complaints policy for non-company
                                            customers is valid
    },
    "corporate": {                          -- not required, a time period when
                                            complaints policy for company
                                            customers is valid
        "period": "P1Y"
    },
    "address": {                            -- required, address for complaints
        "name": "Test",
        "street": "ul. Testowa 7",
        "postCode": "61-135",
        "city": "Poznań",
        "countryCode": "PL"
    },
    "description":                      --  not required, description of
                                        complaints procedure
  “<p> What must a complaint contain? The complaint should include: </p>
  <ul> <li> Your name and address </li> <li> Allegro offer id </li>
  <li> order number </li> <li> item of the complaint </li>
  <li> Your expectations: replacement of the product with a new one,
  repair, reduction of the price or withdrawal from the contract (refund) </li> </ul>”
}’

Click to view sample response:
 {
    "id": "1556c6f7-c6a9-469e-9b3f-8f01eafaedc4",
    "seller": {
        "id": "62799754"
    },
    "name": "Main complaints policy",
    "individual": {
        "period": "P1Y"
    },
    "corporate": {
        "period": "P1Y"
    },
    "address": {
        "name": "test",
        "street": "ul. Testowa 7",
        "postCode": "61-135",
        "city": "Poznań",
        "countryCode": "PL"
    },
    "description": “<p> What must a complaint contain? The complaint should include: </p>
 <ul> <li> Your name and address </li> <li> Allegro offer id </li>
 <li> order number </li> <li> item of the complaint </li>
 <li> Your expectations: replacement of the product with a new one,
 repair, reduction of the price or withdrawal from the contract (refund) </li> </ul>”
 }

How to retrieve complaints policies assigned to the account

Via GET /after-sales-service-conditions/implied-warranties you can retrieve complaints policies assigned to your account. In the response you will receive a list of 60 complaints policies, which contains identifier and the name of the complaints policy. You can adjust the list to your needs using filters:

  • limit - number of results in the response. The default and maximum value is 60,
  • offset - index of first returned result.

If you want to retrieve details of the complaints policy, provide their ID via GET /after-sales-service-conditions/implied-warranties/{impliedWarrantyId}.

Sample request:

  curl -X GET \
  'https://api.allegro.pl/after-sales-service-conditions/implied-warranties/bbb2458-54f1-4dff-a9d4-c9067554390d' \
  -H 'Authorization: Bearer {token}' \
  -H 'Accept: application/vnd.allegro.public.v1+json' \
  -H 'Content-Type: application/vnd.allegro.public.v1+json' \
Click to view sample response:
 {
    "id": bbb2458-54f1-4dff-a9d4-c9067554390d",
    "seller": {
        "id": "627909754"
    },
    "name": "default",
    "individual": {
        "period": "P6Y"
    },
    "corporate": {
        "period": "P6Y"
    },
    "address": {
        "name": "test",
        "street": "ul. Testowa 7",
        "postCode": "61-135",
        "city": "Poznań",
        "countryCode": "PL"
    },
    "description": "<p> What must a complaint contain? The complaint should include: </p>
 <ul> <li> Your name and address </li>
 <li> Allegro offer id </li> <li> order number </li>
 <li> item of the complaint </li> <li> Your expectations: replacement of
 the product with a new one, repair, reduction of the price or withdrawal
 from the contract (refund) </li> </ul>"
 }

How to update complaints policy information

To update complaints policy information:

Click to view sample request:
  curl -X PUT \
  'https://api.allegro.pl/after-sales-service-conditions/implied-warranties/bbbc9778-54f1-4dff-a9d4-c9067554390d' \
  -H 'Authorization: Bearer {token}' \
  -H 'Accept: application/vnd.allegro.public.v1+json' \
  -H 'Content-Type: application/vnd.allegro.public.v1+json' \
  -d ‘{
    "id": "1556c6f7-c6a9-469e-9b3f-8f01eafaedc4",
    "seller": {
        "id": "279934754"
    },
    "name": "Main complaints policy",
    "individual": {
        "period": "P1Y"
    },
    "corporate": null,
    "address": {
        "name": "test",
        "street": "ul. Testowa 7",
        "postCode": "61-135",
        "city": "Poznań",
        "countryCode": "PL"
    },
    "description": “<p> What must a complaint contain? The complaint
     should include: </p>
    <ul> <li> Your name and address </li> <li> Allegro offer id </li>
    <li> order number </li> <li> item of the complaint </li>
    <li> Your expectations: replacement of the product with a new one,
    repair, reduction of the price or withdrawal from the contract (refund) </li> </ul>”
}’

Warranties

How to add attachment to warranty information

Create attachment object via POST /after-sales-service-conditions/attachments. Additionally specify the name of the file in the .pdf format.

Sample request:

  curl -X POST \
  'https://api.allegro.pl/after-sales-service-conditions/attachments' \
  -H 'Authorization: Bearer {token}' \
  -H 'Accept: application/vnd.allegro.public.v1+json' \
  -H 'Content-Type: application/vnd.allegro.public.v1+json' \
  -d’
  {
	“name”: “warranty.pdf” 				-- attachment file name
  }’
Sample response:
  {
    "id": "7c8f40bc-3e50-408b-a66b-48122e05d84e",
    "name": "warranty.pdf",
    "url": null
  }

Now use PUT /after-sales-service-conditions/attachments/{attachmentId} - as attachmentId provide the id value that you have received a step earlier. Remember to use the address we returned in the location header.

Sample request:

  curl -X PUT \
  'https://upload.allegro.pl/after-sales-service-conditions/attachments/7c8f40bc-3e50-408b-a66b-48122e05d84e' \
  -H 'Authorization: Bearer {token}' \
  -H 'Accept: application/vnd.allegro.public.v1+json'
  -H ‘Content-Type: application/pdf’
  --data-binary "@warranty.pdf"                                -- required, content of the
                                    				       	   attachment file in a binary format

Sample response:

  {
    "id": "7c8f40bc-3e50-408b-a66b-48122e05d84e",
    "name": "warranty.pdf",
    "url": "https://after-sales.allegrostatic.com/after-sales-service-5c/7c8f40bc-3e50-408b-a66b-48122e05d84e"
 }

You can add the object you received to a warranty information in the attachment field. We described this process further in this guide.

How to add warranty information

Use POST /after-sales-service-conditions/warranties to add new warranty. In the request structure, provide:

  • name - required, warranty name,
  • type - required, warranty type, available values are MANUFACTURER (warranty by manufacturer or distributor) or SELLER,
  • individual.period - required, warranty period for non-company customers in ISO 8601 format. You can only provide months as value, e.g. “P2M”. If you want to indicate a lifetime warranty, leave this field empty and in the field individual.lifetime, provide ‘true’ value,
  • corporate.period - required, warranty period for company customers in ISO 8601. You can only provide months as value, e.g. “P2M”. If you want to indicate a lifetime warranty, leave this space empty and in the field individual.lifetime, provide the ‘true’ value,
  • attachment - not required, attachment to the warranty,
  • description - not required, additional information, e.g. where to look for information, the contact person and the contact method, required documents, etc.
Click to view sample request:
  curl -X POST \
  'https://api.allegro.pl/after-sales-service-conditions/warranties' \
  -H 'Authorization: Bearer {token}' \
  -H 'Accept: application/vnd.allegro.public.v1+json' \
  -H 'Content-Type: application/vnd.allegro.public.v1+json' \
  -d ‘{
  "name": "test",                           -- required, warranty name
  "type": "MANUFACTURER",                   -- required warranty type,
  "individual": {
    "period": "P12M",                       -- required, warranty period
    "lifetime": false                       -- not required. If warranty is for a
                                            lifetime information
  },
  "corporate": {                            -- not required, warranty period for
                                            entrepreneurs
    "period": "P12M",
    "lifetime": false
  },
  "attachment": {                           -- not required, attachment
                                            information
    "id": "54702c96-4ccd-4c0e-b4c7-382a71e810b5",
    "name": "warranty.pdf",
    "url": "https://after-sales.allegrostatic.com/after-sales-service-5c/7c8f40bc-3e50-408x-a66b-48122e05d84e"
}
  },
  "description": null                       -- not required, additional information
}’

Click to view sample response:
  {
    "id": "bce9e4ad-4e06-4478-8038-04f3cbed73f4",
    "seller": {
        "id": "6279923754"
    },
    "name": "test",
    "type": "MANUFACTURER",
    "individual": {
        "period": "P12M",
        "lifetime": false
    },
    "corporate": {
        "period": "P12M",
        "lifetime": false
    },
    "attachment": {
        "id": "54702c96-4ccd-4c0e-b4c7-382a71e810b5",
        "name": "warranty.pdf",
        "url": "https://after-sales.allegrostatic.com/after-sales-service-00/54702c96-4ccd-4c0e-b4c7-382a71e810b5"
    },
    "description": null
}

How to retrieve warranties assigned to the account

Via GET /after-sales-service-conditions/warranties you can retrieve return policies assigned to your account. In the response you will receive a list of 60 return policies, which contains the identifier and the name of the return policy. You can adjust the list to your needs using filters:

  • limit - number of results in the response. The default and maximum value is 60,
  • offset - index of first returned result.

If you want to retrieve details of the warranty, provide its ID via GET /after-sales-service-conditions/warranties/{warrantyId}.

Sample request:

  curl -X GET \
  'https://api.allegro.pl/after-sales-service-conditions/warranties/bbb2458-54f1-4dff-a9d4-c9067554390d' \
  -H 'Authorization: Bearer {token}' \
  -H 'Accept: application/vnd.allegro.public.v1+json' \
  -H 'Content-Type: application/vnd.allegro.public.v1+json' \
Click to view sample response:
  {
    "id": "bbb2458-54f1-4dff-a9d4-c9067554390d",
    "seller": {
        "id": "627120754"
    },
    "name": "default",
    "type": "MANUFACTURER",
    "individual": {
        "period": null,
        "lifetime": true
    },
    "corporate": {
        "period": null,
        "lifetime": true
    },
    "attachment": {
        "id": "564c8680-505c-4d34-a6d3-bd8e4d20b49d",
        "name": "uploaded_file.pdf",
        "url": "https://after-sales.allegrostatic.com/after-sales-service-b5/564c8680-505c-4d34-a6d3-bd8e4d20b49d&#34;
    },
    "description": null,
}

How to update warranty information

To update warranty information:

Click to view sample request:
  curl -X PUT \
  'https://api.allegro.pl/after-sales-service-conditions/warranties/bbbc9712-54f1-4dff-a9d4-c9067554390d' \
  -H 'Authorization: Bearer {token}' \
  -H 'Accept: application/vnd.allegro.public.v1+json' \
  -H 'Content-Type: application/vnd.allegro.public.v1+json' \
  -d ‘{
    "id": "62c9bede-82be-4d17-831d-af66270d1ade",
    "seller": {
        "id": "62799754"
    },
    "name": "default",
    "type": "MANUFACTURER",
    "individual": {
        "period": null,
        "lifetime": true
    },
    "corporate": {
        "period": null,
        "lifetime": true
    },
    "attachment": {
        "id": "564c8680-505c-4d34-a6d3-bd8e4d20b49d",
        "name": "uploaded_file.pdf",
        "url": "https://after-sales.allegrostatic.com/after-sales-service-b5/564c8680-505c-4d34-a6d3-bd8e4d20b49d"
    },
    "description": null,
}’

4. Blacklist

How to add the buyer to the blacklist

Use POST /sale/blacklisted-users. User, who is added to the blacklist, will not be able to buy your items. You can remove him from the blacklist anytime.


Sample request:

 curl -X POST \
 ‘https://api.allegro.pl/sale/blacklisted-users’ \
 -H ‘Authorization: Bearer {token}’ \
 -H ‘Accept: application/vnd.allegro.public.v1+json’ \
 -H ‘Content-Type: application/vnd.allegro.public.v1+json’
 -d ‘{
    “user”: {
        “id”: 123456,                       	-- required (if login is not provided), buyer’s id
        “login”: “bad_buyer”                	-- required (if user.id is not provided), buyer’s login
    },
    “note”: “Rude person”                       -- note about the reason of blacklisting
 }’ 


Sample response:

 {
    “user”: {
        “id”: 123456,
        “login”: “bad_buyer”
    },
    “note”: “Rude person”,
    “createdAt”: “2019-05-08T09:45:818Z”        -- date the user was added
                                                to the blacklist
 }

How to retrieve blacklist

Use GET /sale/blacklisted-users. In one query you will receive up to 25 results. Use parameter “offset” with multiplied “limit” value to browse more users.


Sample request:

  curl -X GET \
  'https://api.allegro.pl/sale/blacklisted-users' \
  -H 'Accept: application/vnd.allegro.public.v1+json' \
  -H 'Authorization: Bearer {token}'


Sample response:

  {
    “blacklistedUsers”: [
        {
            “user”: {
                “id”: 123456,
                “login”: “bad_buyer”
            },
            “note”: “Rude person”,
            “createdAt”: “2019-07-04T10:41:31.135Z”
        },
        {
            “user”: {
                “id”: 012345,
                “login”: “bad_buyer1”
            },
            “note”: “Rude person”,
            “createdAt”: “2019-07-04T10:35:10.013Z”
        }
    ],
    “offset”: 0,
    “limit”: 25,                            	-- limit of displayed results (maximally 100)
    “total”: 2                              	-- number of users assigned to black list
  }

How to remove a user from blacklist

Use DELETE /sale/blacklisted-users/{{excludedUserId}}. As a userID pass ID of the user, you want to remove from the blacklist.


Sample request:

  curl -X DELETE \
  'https://api.allegro.pl/sale/blacklisted-users/12345678' \
  -H 'Accept: application/vnd.allegro.public.v1+json' \
  -H 'Authorization: Bearer {token}'


Sample response:

  Status 204 OK

5. Contact data

Contact data is required for listing an advertisement.


Remember!

  • you cannot have more than 50 contacts,
  • within one contact you can provide up to:
    • 1 email address,
    • 2 phone numbers.

How to create new contact

Use POST /sale/offer-contacts.


Sample request:

 curl -X POST \
 'https://api.allegro.pl/sale/offer-contacts' \
 -H 'Content-Type: application/vnd.allegro.public.v1+json' \
 -H 'Accept: application/vnd.allegro.public.v1+json’ \
 -H 'Authorization: Bearer {token}' \
 -d '{
   "name": "Auta terenowe",      -- contact name; required; maximum number of characters – 250
   "emails": [                   -- email addresses; you can provide one
     {
       "address": "test@test.pl"
     }
   ],
   "phones": [                   -- phone numbers; you can provide up to two
     {
       "number": "555-555-666"
     },
     {
       "number": "555555667"
     }
   ]
  }’


Sample response:

  {
    "id": "0c046252-9559-4ecb-8ea3-879f60e46947",   -- contact identifier
    "name": "Auta terenowe",                        -- contact name
    "emails": [
        {
            "address": "test@test.pl"
        }
    ],
    "phones": [
     {
       "number": "555-555-666"
     },
     {
       "number": "555555667"
     }
    ]
  }

How to retrieve a list of contacts

Use GET /sale/offer-contacts.


Sample request:

 curl -X GET \
 'https://api.allegro.pl/sale/offer-contacts' \
 -H 'Accept: application/vnd.allegro.public.v1+json’ \
 -H 'Authorization: Bearer {token}’


Sample response:

 {
    "contacts": [
        {
            "id": "0c046252-9559-4ecb-8ea3-879f60e46947",   -- contact identifier
            "name": "Auta terenowe",                     	-- contact name
            "emails": [
                {
                    "address": "test@test.pl"			    -- email addresses
                }
            ],
            "phones": [
                {
                    "number": "+48 788 788 788"			    -- phone numbers
                },
                {
                    "number": "+48 75 575 57 55"
                }
            ]
        },
        {
            "id": "af1ccfd7-2753-4ed3-bdda-c78eb14442ab",
            "name": "Auta osobowe",
            "emails": [
                {
                    "address": "test@test.pl"
                }
            ],
            "phones": [
                {
                    "number": "+48 55 555 57 77"
                }
            ]
        },
        {
            "id": "27869b31-048e-43a0-bdc0-52b922f278a5",
            "name": "Ciężarówki",
            "emails": [
                {
                    "address": "test@test.pl"
                }
            ],
            "phones": []
        }
    ]
   }

How to retrieve contact details

Use GET /sale/offer-contacts/{id}. As a id provide an identifier of a specific contact - you can retrieve it via GET /sale/offer-contacts.


Sample request:

 curl -X GET \
 ‘https://api.allegro.pl/sale/offer-contacts/0c046252-9559-4ecb-8ea3-879f60e46947' \
 -H 'Accept: application/vnd.allegro.public.v1+json’ \
 -H 'Authorization: Bearer {token}’


Sample response:

  {
    "id": "0c046252-9559-4ecb-8ea3-879f60e46947",       -- contact identifier
    "name": "Auta terenowe",                            -- contact name
    "emails": [
        {
            "address": "test@test.pl"
        }
    ],
    "phones": [
        {
            "number": "+48 55 555 57 77"
        }
    ]
  }

How to change contact data

Use PUT /sale/offer-contacts/{id}. As a id provide an identifier of a specific contact - you can retrieve it via GET /sale/offer-contacts.


Sample request:

 curl -X PUT \
 'https://api.allegro.pl/sale/offer-contacts/0c046252-9559-4ecb-8ea3-879f60e46947' \
 -H 'Content-Type: application/vnd.allegro.public.v1+json' \
 -H 'Accept: application/vnd.allegro.public.v1+json’ \
 -H 'Authorization: Bearer {token}' \
 -d '{
  "name": "Auta terenowe",        -- contact name; required; maximum number of characters – 250
  "emails": [                     -- email addresses; you can provide one
    {
      "address": "test@test.pl"
    }
  ],
  "phones": [                      -- phone numbers; you can provide up to two
    {
      "number": "555-555-666"
    }
  ]
 }’


Sample response:

  {
    "id": "0c046252-9559-4ecb-8ea3-879f60e46947",
    "name": "Auta terenowe",
    "emails": [
        {
            "address": "test@test.pl"
        }
    ],
    "phones": [
        {
            "number": "555-555-666”
        }
    ]
  }

6. Email addresses

As of March 26, 2019, the buyer’s email address will be returned as a string in the @allegromail.pl domain, e.g.:

  • 8awgqyk6a5@allegromail.pl - encoded version of the email address,
  • 8awgqyk6a5+cub31c122@allegromail.pl - encoded version of the email address with information about the transaction.

We have introduced this change because of security reasons and to protect personal data. All addresses are masked on Allegro. The masked email address consists of an encoded seller-buyer pair and information about the transaction. To read more about email address masking, please visit Allegro Help.

As a result, to contact sellers, buyers must use accounts assigned to their accounts. For this reason, we offer you resources for managing additional email addresses:

How to add an additional email

Use POST /account/additional-emails to assign an additional email address to your account. You must be logged in as the account owner.


Sample request:

 curl -X POST \
 'https://api.allegro.pl/account/additional-emails' \
 -H 'content-type: application/vnd.allegro.public.v1+json' \
 -H 'Accept: application/vnd.allegro.public.v1+json’ \
 -H 'authorization: Bearer {token}' \
 -d '{
  “email”: adresemail@gmail.com                   -- required; you can provide one email                                                         address. The email address cannot be 
                                                  longer than 64 characters excluding 
                                                  the domain address.
 }'


Sample response:

 {
    "id": "5c40a8fa7fae6f7613c2b560",
    “email”:  “adresemail@gmail.com”,
    “createdAt”: "2019-04-02T17:03:00Z"
 }

Supported HTTP responses:

  • 201 Created - Correct response,
  • 400 Bad request,
  • 401 Unauthorized,
  • 422 Unprocessable Entity.

How to retrieve email addresses

Use GET /account/additional-emails to retrieve email addresses assigned to your account. You must be logged in as the account owner.


Sample request:

  curl -X GET \
  'https://api.allegro.pl/account/additional-emails' \
  -H 'Accept: application/vnd.allegro.public.v1+json’ \
  -H 'authorization: Bearer {token}'


Sample response:

  {
    “additional-emails”: [
        {
            "id": "5c40a8fa7fae6f7613c2b560",
            “email”:  “adresemail@gmail.com”,
            “createdAt”: "2019-04-02T17:03:00Z"
        },
        {
            "id": "6c30a8ga9fsc6f8651c2b523",
            “email”:  “adresemail2@gmail.com”,
            “createdAt”: "2019-04-03T13:12:33Z"
        },
    ]
 }

Correct response:

  • 200 Odpowiedź prawidłowa,
  • 401 Unauthorized.

How to retrieve e-mail details

Use GET /account/additional-emails/{emailID} to retrieve detailed information concerning the email address. You must be logged in as the account owner.


Sample request:

  curl -X GET \
  'https://api.allegro.pl/account/additional-emails/5c40a8fa7fae6f7613c2b560' \
  -H 'Accept: application/vnd.allegro.public.v1+json’ \
  -H 'authorization: Bearer {token}'


Sample response:

  {
    "id": "5c40a8fa7fae6f7613c2b560",
    “email”:  “adresemail@gmail.com”,
    “createdAt”: "2019-04-02T17:03:00Z"
  }

Supported HTTP responses:

  • 200 Correct response,
  • 401 Unauthorized,
  • 404 Not Found.

How to remove e-mail

Use DELETE /account/additional-emails/{emailID} to remove a particular email address. You must be logged in as the account owner.


Sample request:

  curl -X DELETE \
  'https://api.allegro.pl/account/additional-emails/5c40a8fa7fae6f7613c2b560' \
  -H 'Accept: application/vnd.allegro.public.v1+json’ \
  -H 'authorization: Bearer {token}'


Sample response:

  status 204 No Content

Supported HTTP responses:

  • 204 Email deleted successfully,
  • 401 Unauthorized,
  • 404 Not Found.

7. List of resources

Full documentation of resources in the swagger.yaml form file you will find here.