> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://documentation.sayari.com/api/api-reference/project-entity-supply-chain-snapshots/create-project-entity-supply-chain-snapshot/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://documentation.sayari.com/_mcp/server. # Create Project Entity Supply Chain Snapshot POST https://api.sayari.com/v1/projects/{project_id}/entities/{project_entity_id}/supply_chain/snapshots Content-Type: application/json Creates a new supply chain snapshot for a project entity. Reference: https://documentation.sayari.com/api/api-reference/project-entity-supply-chain-snapshots/create-project-entity-supply-chain-snapshot ## Authentication - OAuth2 — send the obtained token as `Authorization: Bearer ` ## Servers - `https://api.sayari.com` (Production, default) - `https://api.internal.sayari.com` (Dev) - `https://api.uk.sayari.com` (Production_UK) ## Request ### Path parameters - `project_id` (string, required) - `project_entity_id` (string, required) ### Body (application/json) This endpoint expects a CreateProjectEntitySupplyChainSnapshotRequest. - `label` (string, required) ## Response ### 200 - `snapshot_id` (string, required) ## Errors ### 400 Bad Request - `any` ### 401 Unauthorized - `any` ### 404 Not Found - `status` (integer, required) - `message` (list of string, required) - `success` (boolean, required) ### 405 Method Not Allowed - `status` (integer, required) - `message` (list of string, required) - `success` (boolean, required) ### 429 Rate Limit Exceeded - `any` ### 500 Internal Server Error - `any` ## Examples **Request** ```json { "label": "Q1 2024 Supply Chain Analysis" } ``` **Response** ```json { "snapshot_id": "nK9mP2" } ``` **SDK Code** ```python import requests url = "https://api.sayari.com/v1/projects/V03eYM/entities/BG72YW/supply_chain/snapshots" payload = { "label": "Q1 2024 Supply Chain Analysis" } headers = { "Authorization": ".", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.sayari.com/v1/projects/V03eYM/entities/BG72YW/supply_chain/snapshots'; const options = { method: 'POST', headers: {Authorization: '.', 'Content-Type': 'application/json'}, body: '{"label":"Q1 2024 Supply Chain Analysis"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.sayari.com/v1/projects/V03eYM/entities/BG72YW/supply_chain/snapshots" payload := strings.NewReader("{\n \"label\": \"Q1 2024 Supply Chain Analysis\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", ".") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.sayari.com/v1/projects/V03eYM/entities/BG72YW/supply_chain/snapshots") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = '.' request["Content-Type"] = 'application/json' request.body = "{\n \"label\": \"Q1 2024 Supply Chain Analysis\"\n}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.sayari.com/v1/projects/V03eYM/entities/BG72YW/supply_chain/snapshots") .header("Authorization", ".") .header("Content-Type", "application/json") .body("{\n \"label\": \"Q1 2024 Supply Chain Analysis\"\n}") .asString(); ``` ```php request('POST', 'https://api.sayari.com/v1/projects/V03eYM/entities/BG72YW/supply_chain/snapshots', [ 'body' => '{ "label": "Q1 2024 Supply Chain Analysis" }', 'headers' => [ 'Authorization' => '.', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.sayari.com/v1/projects/V03eYM/entities/BG72YW/supply_chain/snapshots"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "."); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"label\": \"Q1 2024 Supply Chain Analysis\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "Authorization": ".", "Content-Type": "application/json" ] let parameters = ["label": "Q1 2024 Supply Chain Analysis"] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.sayari.com/v1/projects/V03eYM/entities/BG72YW/supply_chain/snapshots")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```