Add Tax Item to Cart
POSThttps://useast.api.elasticpath.com/v2/carts/:cartID/items/:cartitemID/taxes
Use this endpoint to add a tax item to a cart.
note
There is a soft limit of 5 unique tax items per cart item at any one time.
Request
Responses
- 200
- 401
- 422
Response Headers
Unauthorized
Unauthorized
Authorization: http
name: bearerAuthtype: httpscheme: bearer
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://useast.api.elasticpath.com/v2/carts/:cartID/items/:cartitemID/taxes");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{\n \"data\": {\n \"code\": \"string\",\n \"jurisdiction\": \"string\",\n \"name\": \"string\",\n \"rate\": 0,\n \"amount\": 0,\n \"type\": \"string\"\n }\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
ResponseClear