REST is a data architecture and design methodology that produces consistent, predictable outputs and behaviors. This is achieved by using the HTTP/HTTPS transport protocol and standard methods, called verbs.
An API comprises a set of dedicated URLs that return standardized data in the JSON messaging format, referred to here as the resource . An API uses standard HTTPS features and verbs to communicate data between the server and application without having to render the presentation overhead of the graphical user interface on the client.
A call includes the following elements:
- An HTTPS header that contains authentication information and other relevant instructions.
- A verb such as GET, PUT, POST, PATCH, or DELETE.
- A Uniform Resource Indicator (URI) endpoint that identifies the server, web service, and resource.
- The input parameters and attributes supplied with the request, known as the call payload.
A response payload is returned with an HTTPS status code.
Once you get an API key, you can communicate securely from your web application with the API. All API responses are returned in JSON, and then converted to language-specific objects.
The URI that is used to communicate with Vertex Cloud depends on the type of call that you are making:
Seller Transaction Features
Freight can be managed in three different ways, each with its own benefits and drawbacks. The way freight is implemented depends on the capabilities of the host system.
Apply a Freight Amount Field per Line Item
This method applies a freight amount to each line item and calculates the freight tax for each item individually. This method is the simplest way to manage freight within Vertex Cloud and is one of the most common means of managing freight within host systems.
Apply a Freight Element
This field sets the freight charge associated with the line item. Note that the preferred method for dealing with freight is to create a separate line item with an item type mapped to one of the Vertex-provided item categories. However, this method calculates tax for the default Freight Item category and rolls it into this line item.
Create a Child Line Item for Freight Charges for Each Order Line Item
With this method, a child line item is created for the appropriately apportioned freight charges for each line. This is the most elegant approach to freight management, because freight can be distributed with finely tuned freight rules to each line item. The customer can control which items are applicable and non-applicable for freight (product vs service), avoiding issues with automatic apportionment. This, however, is the most difficult solution to implement because it requires more functionality within the host system.
If there is a discount amount, the extended price should be the net price (minus the discount amount), not the gross price. Then populate discount appropriately. For example, a customer buys shoes that are priced at $100 and sold for $90. The extended price should be $90, considering the $10 discount. This discount field should be marked as $10.
This approach ensures that the order is taxed as a $100 order, even though the customer is only paying $90. This is an important differentiator. If the extended price is marked as $100, and the discount is marked as $10, the order will be taxed as if it were a $110 order.
It is important to know whether the host system can categorize discounts. For example, manufacturer discounts are taxed differently than promotional discounts.
If Discount is passed, you must include the user-defined discount code, if mapped, and either Discount Percent or Discount Amount. Extended price always reflects the discount.
NOTE: Most host systems deduct the discount amount from the extended price.