# Submit a New Order POST https://photos.conventionphotography.com/api/orders/create ## Submit a New Order Creates a new photo order with customer details and selected photos. ### Endpoint `POST https://convention.photos/api/orders/create` ### Description Processes a complete order submission including customer information, shipping address, selected photos, and payment processing. Validates address using USPS and creates order record. ### Request Body ```json { "eventSlug": "ASDAR26", "photos": ["1234", "1235"], "customerInfo": { "name": "John Doe", "email": "john@example.com" }, "shippingAddress": { "line1": "123 Main St", "city": "Orlando", "state": "FL", "zip": "32801" } } ``` ### Response Returns order confirmation with order number and status. ### Use Cases - Complete photo ordering process - Process customer orders with validation - Generate order receipts and tracking ### Authentication May require CAPTCHA or email verification for spam prevention. Reference: https://docs.convention.photos/api-reference/cps-api/convention-photos/submit-a-new-order ## OpenAPI Specification ```yaml openapi: 3.1.0 info: title: Convention Photography System (CPS) version: 1.0.0 paths: /api/orders/create: post: operationId: submit-a-new-order summary: Submit a New Order description: >- ## Submit a New Order Creates a new photo order with customer details and selected photos. ### Endpoint `POST https://convention.photos/api/orders/create` ### Description Processes a complete order submission including customer information, shipping address, selected photos, and payment processing. Validates address using USPS and creates order record. ### Request Body ```json { "eventSlug": "ASDAR26", "photos": ["1234", "1235"], "customerInfo": { "name": "John Doe", "email": "john@example.com" }, "shippingAddress": { "line1": "123 Main St", "city": "Orlando", "state": "FL", "zip": "32801" } } ``` ### Response Returns order confirmation with order number and status. ### Use Cases - Complete photo ordering process - Process customer orders with validation - Generate order receipts and tracking ### Authentication May require CAPTCHA or email verification for spam prevention. tags: - subpackage_conventionPhotos responses: '200': description: Order created successfully content: application/json: schema: $ref: >- #/components/schemas/convention.photos_submitANewOrder_Response_200 servers: - url: https://photos.conventionphotography.com - url: https://convention.photos components: schemas: convention.photos_submitANewOrder_Response_200: type: object properties: {} description: Empty response body title: convention.photos_submitANewOrder_Response_200 ``` ## SDK Code Examples ```python import requests url = "https://photos.conventionphotography.com/api/orders/create" response = requests.post(url) print(response.json()) ``` ```javascript const url = 'https://photos.conventionphotography.com/api/orders/create'; const options = {method: 'POST'}; 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" "net/http" "io" ) func main() { url := "https://photos.conventionphotography.com/api/orders/create" req, _ := http.NewRequest("POST", url, nil) 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://photos.conventionphotography.com/api/orders/create") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) 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://photos.conventionphotography.com/api/orders/create") .asString(); ``` ```php request('POST', 'https://photos.conventionphotography.com/api/orders/create'); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://photos.conventionphotography.com/api/orders/create"); var request = new RestRequest(Method.POST); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let request = NSMutableURLRequest(url: NSURL(string: "https://photos.conventionphotography.com/api/orders/create")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" 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() ```