Order Attributes API

Order Attributes API

1. Amasty\Orderattr\Api\EntityDataRepositoryInterface - class for managing order attributes in the backend:
  1. POST /V1/amasty_orderattr/entityData, method="save" - create an attribute;
  2. PUT /V1/amasty_orderattr/entityData/:entityId, method="save" - edit an attribute;
  3. DELETE /V1/amasty_orderattr/entityData/:entityId, method="deleteById" - delete an attribute;
  4. GET /V1/amasty_orderattr/entityData, method="getById" - get information about an attribute;
  5. GET /V1/amasty_orderattr/entityData/all, method="getByOrderId" - get a list with attributes by order ID;
  6. GET /V1/amasty_orderattr/entityData/all, method="getList" - get a list with attributes.

2. Amasty\Orderattr\Api\CheckoutDataRepositoryInterface - class for managing order attributes on checkout for registered users:
  1. POST /V1/amasty_orderattr/checkoutData, method="save" - add an order attribute on checkout for a logged-in user.

3. Amasty\Orderattr\Api\GuestCheckoutDataRepositoryInterface - class for managing order attributes on checkout for logged-in users:
  1. POST /V1/amasty_orderattr/guestCheckoutData, method="save" -  add an order attribute on checkout for a guest.

4. Amasty\Orderattr\Api\UploadFileInterface - class for managing file type order attributes:
  1. POST /V1/amasty_orderattr/uploadFile, method="upload" - upload a file as an order attribute.


      • Related Articles

      • What Amasty extensions support API?

        Each Amasty extension that has API support, includes the etc/webapi.xml file. The webapi.xml file contains API configurations with the list of available API requests. For example, a request from the Custom Form module interface: 1 - endpoint URL; 2 - ...
      • Order Attributes | GraphQL methods

        Queries amOrderattrAvailableAttributes (cartId: String!) description: get the list of available order attributes amOrderattrAttributesRelations description: get information about order attribute relations Mutations saveAmOrderattrValues (cartId: ...
      • Order Archive API

        Amasty\Orderarchive\Api\ArchiveProcessorInterface - class for managing order archives in backend: POST /V1/amastyMoveToArchive, method="moveToArchive" - move an order to archive; POST /V1/amastyMoveFromArchive, method="removeFromArchive" - remove an ...
      • I want to use your Order Attributes in scripts/customizations. How may I get their values from the code?

        To get the Order Attributes values from the code, you may use the strings below: $orderRepository = $objectManager->get('Magento\Sales\Api\OrderRepositoryInterface'); $order= $orderRepository->get(); $attr = $order->getData('');
      • Extra Fee API

        1. Amasty\Extrafee\Api\TotalsInformationManagementInterface - class for managing cart totals for logged-in users: POST /V1/amasty_extrafee/carts/:cartId/totals-information, method="calculate" - calculate totals of a specific cart; POST ...