{"id":21951185,"url":"https://github.com/jeronimobarea/squarespaceorders","last_synced_at":"2025-10-09T14:36:34.400Z","repository":{"id":130347687,"uuid":"265204513","full_name":"jeronimobarea/SquarespaceOrders","owner":"jeronimobarea","description":"This programs fetch your squarespace orders api (every 24h) and organize the data in a no sql database (Firestore)  also let's you fetch your users data by email","archived":false,"fork":false,"pushed_at":"2020-05-23T19:01:19.000Z","size":1225,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-07T05:05:19.146Z","etag":null,"topics":["api","firestore","go","golang","nosql","squarespace"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jeronimobarea.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-19T09:31:54.000Z","updated_at":"2020-05-23T19:01:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"4802b3ca-b59f-423b-9e86-8bd06c184f7e","html_url":"https://github.com/jeronimobarea/SquarespaceOrders","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jeronimobarea/SquarespaceOrders","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeronimobarea%2FSquarespaceOrders","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeronimobarea%2FSquarespaceOrders/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeronimobarea%2FSquarespaceOrders/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeronimobarea%2FSquarespaceOrders/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeronimobarea","download_url":"https://codeload.github.com/jeronimobarea/SquarespaceOrders/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeronimobarea%2FSquarespaceOrders/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001507,"owners_count":26083118,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","firestore","go","golang","nosql","squarespace"],"created_at":"2024-11-29T06:12:46.880Z","updated_at":"2025-10-09T14:36:34.379Z","avatar_url":"https://github.com/jeronimobarea.png","language":"Go","readme":"# Squarespace Orders v0.1\nThis api checks every 24h your Squarespace orders api and retrieves the data of all\nthe orders and create docs for every email and stores the orders by email also saves\nbasic user info. You can customize the info that you want with the struct's that \nare commented in the types.go file.\n\nYou can use it if you want to get filtered data from a user (because squarespace\napi don't provide any filter option).\n\n## Firestore structure\n\u003e Users\n\u003e \u003e [user email]\n\u003e \u003e \u003e User data\n\u003e \u003e \n\u003e \u003e \u003e Orders\n\u003e \u003e \u003e \u003e Product name\n\u003e \u003e \u003e \u003e \u003e Product data \n\n## Google cloud platform\nCreate a project and create a Firestore instance.\nCreate credentials for your project and download the json file.\n\n```zsh\nexport GOOGLE_APPLICATION_CREDENTIALS=\"[PATH]\"\n```\n\n## Go config \nGet your Google cloud platform project ID and create your squarespace orders api\nkey.\n```go\npackage main\n\nconst (\n\tprojectID      = \"YOUR GOOGLE PLATFORM PROJECT ID\"\n\tApiKey         = \"YOUR SQUARESPACE API KEY\"\n\tsquareSpaceURL = \"https://api.squarespace.com/1.0/commerce/orders/\"\n)\n```\n\n\nFor testing the app in dev mode.\n```go\ngo run *.go\n```\n\nFor production or deploy.\n```go\ngo build\n```\n\nDefault data that I store is. The fields that have an interface type is because\nI don't know what field type are so feel free to improve it for yourself.\n```go\npackage main\n\ntype FilteredTicket struct {\n\tID            string               `json:\"id,omitempty\"`\n\tOrderNumber   string               `json:\"orderNumber,omitempty\"`\n\tCreatedOn     string               `json:\"createdOn,omitempty\"`\n\tCustomerEmail string               `json:\"customerEmail,omitempty\"`\n\tItems         []SimplifiedLineItem `json:\"lineItems,omitempty\"`\n\tUserData      UserData             `json:\"billingAddress,omitempty\"`\n}\n\ntype SimplifiedLineItem struct {\n\tID          string `json:\"id,omitempty\"`\n\tProductID   string `json:\"productId,omitempty\"`\n\tProductName string `json:\"productName,omitempty\"`\n\tQuantity    int64  `json:\"quantity,omitempty\"`\n}\n\ntype FilteredResult struct {\n\tResult     []FilteredTicket `json:\"result,omitempty\"`\n\tPagination Pagination       `json:\"pagination,omitempty\"`\n}\n\ntype Pagination struct {\n\tNextPageUrl    string `json:\"nextPageUrl,omitempty\"`\n\tNextPageCursor string `json:\"nextPageCursor,omitempty\"`\n\tHasNextPage    bool   `json:\"hasNextPage,omitempty\"`\n}\n\ntype UserData struct {\n\tFirstName   string `json:\"firstName,omitempty\"`\n\tLastName    string `json:\"lastName,omitempty\"`\n\tCountryCode string `json:\"countryCode\"`\n\tPhone       string `json:\"phone\"`\n}\n```\n\nYou can customize the data that you want to save.\n```go\npackage main\n\ntype Result struct {\n\tResult     []Order    `json:\"result,omitempty\"`\n\tPagination Pagination `json:\"pagination,omitempty\"`\n}\n\ntype Pagination struct {\n\tNextPageUrl    string `json:\"nextPageUrl,omitempty\"`\n\tNextPageCursor string `json:\"nextPageCursor,omitempty\"`\n\tHasNextPage    bool   `json:\"hasNextPage,omitempty\"`\n}\n\ntype Order struct {\n\tID                     string           `json:\"id,omitempty\"`\n\tOrderNumber            string           `json:\"orderNumber,omitempty\"`\n\tCreatedOn              string           `json:\"createdOn,omitempty\"`\n\tModifiedOn             string           `json:\"modifiedOn,omitempty\"`\n\tChannel                string           `json:\"channel,omitempty\"`\n\tTestmode               bool             `json:\"testmode,omitempty\"`\n\tCustomerEmail          string           `json:\"customerEmail,omitempty\"`\n\tBillingAddress         IngAddress       `json:\"billingAddress,omitempty\"`\n\tShippingAddress        IngAddress       `json:\"shippingAddress,omitempty\"`\n\tFulfillmentStatus      string           `json:\"fulfillmentStatus,omitempty\"`\n\tLineItems              []LineItem       `json:\"lineItems\"`\n\tInternalNotes          []interface{}    `json:\"internalNotes\"`\n\tShippingLines          []interface{}    `json:\"shippingLines\"`\n\tDiscountLines          []interface{}    `json:\"discountLines\"`\n\tFormSubmission         []FormSubmission `json:\"formSubmission\"`\n\tFulfillments           []interface{}    `json:\"fulfillments\"`\n\tSubtotal               DiscountTotal    `json:\"subtotal,omitempty\"`\n\tShippingTotal          DiscountTotal    `json:\"shippingTotal,omitempty\"`\n\tDiscountTotal          DiscountTotal    `json:\"discountTotal,omitempty\"`\n\tTaxTotal               DiscountTotal    `json:\"taxTotal,omitempty\"`\n\tRefundedTotal          DiscountTotal    `json:\"refundedTotal,omitempty\"`\n\tGrandTotal             DiscountTotal    `json:\"grandTotal,omitempty\"`\n\tChannelName            string           `json:\"channelName,omitempty\"`\n\tExternalOrderReference interface{}      `json:\"externalOrderReference\"`\n\tFulfilledOn            string           `json:\"fulfilledOn,omitempty\"`\n\tPriceTaxInterpretation string           `json:\"priceTaxInterpretation,omitempty\"`\n}\n\ntype IngAddress struct {\n\tFirstName   string      `json:\"firstName,omitempty\"`\n\tLastName    string      `json:\"lastName,omitempty\"`\n\tAddress1    string      `json:\"address1\"`\n\tAddress2    string      `json:\"address2\"`\n\tCity        string      `json:\"city\"`\n\tState       string      `json:\"state\"`\n\tCountryCode string      `json:\"countryCode\"`\n\tPostalCode  string      `json:\"postalCode\"`\n\tPhone       string      `json:\"phone\"`\n}\n\ntype DiscountTotal struct {\n\tValue    string `json:\"value,omitempty\"`\n\tCurrency string `json:\"currency,omitempty\"`\n}\n\ntype FormSubmission struct {\n\tLabel string `json:\"label,omitempty\"`\n\tValue string `json:\"value,omitempty\"`\n}\n\ntype LineItem struct {\n\tID             string        `json:\"id,omitempty\"`\n\tVariantID      string        `json:\"variantId\"`\n\tSku            string        `json:\"sku\"`\n\tProductID      string        `json:\"productId,omitempty\"`\n\tProductName    string        `json:\"productName,omitempty\"`\n\tQuantity       int64         `json:\"quantity,omitempty\"`\n\tUnitPricePaid  DiscountTotal `json:\"unitPricePaid,omitempty\"`\n\tVariantOptions interface{}   `json:\"variantOptions\"`\n\tCustomizations interface{}   `json:\"customizations\"`\n\tImageURL       string        `json:\"imageUrl,omitempty\"`\n\tLineItemType   string        `json:\"lineItemType,omitempty\"`\n}\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeronimobarea%2Fsquarespaceorders","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeronimobarea%2Fsquarespaceorders","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeronimobarea%2Fsquarespaceorders/lists"}