Skip to content

Instantly share code, notes, and snippets.

@0-Sony
Created August 16, 2023 15:17
Show Gist options
  • Save 0-Sony/322d2e305bbd685b0b6ac22340672a0b to your computer and use it in GitHub Desktop.
Save 0-Sony/322d2e305bbd685b0b6ac22340672a0b to your computer and use it in GitHub Desktop.
Magento 2 : Create Company via API (Postman example)
Method @POST : www.mydomaine.com/rest/{storeCode}/V1/company
{
"company": {
"status": 1,
"company_name": "MY COMPANY",
"company_email": "john@doe.com",
"street": [
"10 rue du test"
],
"city": "Paris",
"country_id": "FR",
"region": "",
"region_id": "",
"postcode": "75013",
"telephone": "0102030405",
"super_user_id": 1234, // given id when the customer is created
"customer_group_id": 1
}
}
Method @POST : www.mydomaine.com/rest/{storeCode}/V1/customers
{
"customer": {
"dob": "01/01/2000",
"email": "john@doe.com",
"firstname": "John",
"lastname": "Doe",
"website_id": 1
},
"password": "azeaze123*"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment