---
updatedAt: 2026-08-31T13:05:57.000Z
agentTools:
  projectIndex: https://developers.deliverect.com/v3.0-ordering-experience/llms.txt
---

# Update Basket - Group Order Policies

### Purpose

Update the group order basket policies.

## Policies

Pre-defined policies configuration that can be attached to the group basket.

| Policy                                                             | Behaviour                                                                                   | Scope    |
| :----------------------------------------------------------------- | :------------------------------------------------------------------------------------------ | :------- |
| New Joiners Deadline (**newJoinersDeadline**)                      | Defines the cutoff time after which no new customers can be added to the group.             | Basket   |
| Items Modification Deadline (**groupItemsModificationDeadline**)   | Defines the cutoff time after which customers can no longer modify their items.             | Basket   |
| Items Modification Deadline (**customerItemsModificationDeadline** | Defines the cutoff time after which a particular customer can no longer modify their items. | Customer |

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Commerce API",
    "description": " Our Commerce API powers digital ordering via endpoints that provide store details, menu data, basket calculation and validation and provides a checkout flow to handle POS order injection.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.staging.deliverect.com"
    }
  ],
  "security": [
    {
      "oauth2ClientCredentials": []
    }
  ],
  "components": {
    "securitySchemes": {
      "oauth2ClientCredentials": {
        "type": "oauth2",
        "description": "Obtain an access token using the partner client ID and client secret. Send the returned token with each API request in the Authorization header as a Bearer token.",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "/oauth/token",
            "scopes": {}
          }
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true,
    "oauth-options": {
      "useInsecureClientAuthentication": true
    }
  },
  "x-readme-fauxas": true,
  "paths": {
    "/commerce/{accountId}/baskets/{basketId}/group/policies": {
      "patch": {
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "examples": {
                  "OK": {
                    "summary": "OK",
                    "value": {
                      "id": "6643782d0c1914c93a846834",
                      "created": "2024-05-14T14:41:49.738000+00:00",
                      "updated": "2024-05-14T14:41:49.754000+00:00",
                      "deleted": false,
                      "etag": "f4c8f20eeb23206c2bc8cf66c2843a6efaa3eaaf",
                      "accountId": "65c35d109a19b819b7cf78d8",
                      "storeId": "65eee6a9984a1bc1b9637c59",
                      "channelLinkId": "65eee6a9984a1bc1b9637c59",
                      "channelOrderId": null,
                      "channelOrderDisplayId": null,
                      "currency": "EUR",
                      "taxExclusive": false,
                      "status": "open",
                      "items": [
                        {
                          "menuId": "62d7f77f64c95193cc29aa91",
                          "plu": "STK-01",
                          "name": "Delicious Steak Frites",
                          "quantity": 2,
                          "price": 1500,
                          "gross": 3800,
                          "taxes": [],
                          "net": 3800,
                          "subItems": [
                            {
                              "customizationPlu": "MOD-01",
                              "plu": "DRNK-01",
                              "name": "Coca Cola",
                              "quantity": 1,
                              "price": 400,
                              "subItems": []
                            }
                          ],
                          "discounts": [],
                          "discountTotal": 0,
                          "customerId": "691327c5d367f4588f948201"
                        },
                        {
                          "menuId": "62d7f77f64c95193cc29aa91",
                          "plu": "STK-01",
                          "name": "Delicious Steak Frites",
                          "quantity": 1,
                          "price": 1500,
                          "gross": 1500,
                          "taxes": [],
                          "net": 1500,
                          "subItems": [],
                          "discounts": [],
                          "discountTotal": 0,
                          "customerId": "691327c5d367f4588f948202"
                        }
                      ],
                      "payment": {
                        "tips": [],
                        "discountsTotal": 0,
                        "taxTotal": 0,
                        "tipTotal": 0,
                        "total": 5300
                      },
                      "group": {
                        "customers": [
                          {
                            "id": "691327c5d367f4588f948201",
                            "role": "host",
                            "name": "John Doe",
                            "companyName": "ACME",
                            "phoneNumber": "+3211223344",
                            "email": "john.doe@acme.com",
                            "externalId": "crm-id-1234",
                            "tin": "123456789"
                          },
                          {
                            "id": "691327c5d367f4588f948202",
                            "role": "guest",
                            "name": "Patrick Doe",
                            "companyName": "ACME",
                            "phoneNumber": "+3211223344",
                            "email": "patrick.doe@acme.com",
                            "externalId": "crm-id-1235",
                            "tin": "123456790"
                          }
                        ],
                        "policies": [
                          {
                            "type": "newJoinersDeadline",
                            "deadline": "2026-12-30T23:59:59.000000Z"
                          },
                          {
                            "type": "groupItemsModificationDeadline",
                            "deadline": "2026-12-31T23:59:59.000000Z"
                          },
                          {
                            "type": "customerItemsModificationDeadline",
                            "deadline": "2027-01-01T23:59:59.000000Z",
                            "customerId": "691327c5d367f4588f948202"
                          }
                        ]
                      },
                      "customer": null,
                      "fulfillment": {
                        "type": "pickup"
                      },
                      "taxes": [],
                      "discounts": []
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "6643782d0c1914c93a846834"
                    },
                    "created": {
                      "type": "string",
                      "example": "2024-05-14T14:41:49.738000+00:00"
                    },
                    "updated": {
                      "type": "string",
                      "example": "2024-05-14T14:41:49.754000+00:00"
                    },
                    "deleted": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "etag": {
                      "type": "string",
                      "example": "f4c8f20eeb23206c2bc8cf66c2843a6efaa3eaaf"
                    },
                    "accountId": {
                      "type": "string",
                      "example": "65c35d109a19b819b7cf78d8"
                    },
                    "storeId": {
                      "type": "string",
                      "example": "65eee6a9984a1bc1b9637c59"
                    },
                    "channelLinkId": {
                      "type": "string",
                      "example": "65eee6a9984a1bc1b9637c59"
                    },
                    "channelOrderId": {},
                    "channelOrderDisplayId": {},
                    "currency": {
                      "type": "string",
                      "example": "EUR"
                    },
                    "taxExclusive": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "status": {
                      "type": "string",
                      "example": "open"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "menuId": {
                            "type": "string",
                            "example": "62d7f77f64c95193cc29aa91"
                          },
                          "plu": {
                            "type": "string",
                            "example": "STK-01"
                          },
                          "name": {
                            "type": "string",
                            "example": "Delicious Steak Frites"
                          },
                          "quantity": {
                            "type": "integer",
                            "example": 2,
                            "default": 0
                          },
                          "price": {
                            "type": "integer",
                            "example": 1500,
                            "default": 0
                          },
                          "gross": {
                            "type": "integer",
                            "example": 3800,
                            "default": 0
                          },
                          "taxes": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {}
                            }
                          },
                          "net": {
                            "type": "integer",
                            "example": 3800,
                            "default": 0
                          },
                          "subItems": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "customizationPlu": {
                                  "type": "string",
                                  "example": "MOD-01"
                                },
                                "plu": {
                                  "type": "string",
                                  "example": "DRNK-01"
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Coca Cola"
                                },
                                "quantity": {
                                  "type": "integer",
                                  "example": 1,
                                  "default": 0
                                },
                                "price": {
                                  "type": "integer",
                                  "example": 400,
                                  "default": 0
                                },
                                "subItems": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {}
                                  }
                                }
                              }
                            }
                          },
                          "discounts": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {}
                            }
                          },
                          "discountTotal": {
                            "type": "integer",
                            "example": 0,
                            "default": 0
                          },
                          "customerId": {
                            "type": "string",
                            "example": "691327c5d367f4588f948201"
                          }
                        }
                      }
                    },
                    "payment": {
                      "type": "object",
                      "properties": {
                        "tips": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {}
                          }
                        },
                        "discountsTotal": {
                          "type": "integer",
                          "example": 0,
                          "default": 0
                        },
                        "taxTotal": {
                          "type": "integer",
                          "example": 0,
                          "default": 0
                        },
                        "tipTotal": {
                          "type": "integer",
                          "example": 0,
                          "default": 0
                        },
                        "total": {
                          "type": "integer",
                          "example": 5300,
                          "default": 0
                        }
                      }
                    },
                    "group": {
                      "type": "object",
                      "properties": {
                        "customers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "example": "691327c5d367f4588f948201"
                              },
                              "role": {
                                "type": "string",
                                "example": "host"
                              },
                              "name": {
                                "type": "string",
                                "example": "John Doe"
                              },
                              "companyName": {
                                "type": "string",
                                "example": "ACME"
                              },
                              "phoneNumber": {
                                "type": "string",
                                "example": "+3211223344"
                              },
                              "email": {
                                "type": "string",
                                "example": "john.doe@acme.com"
                              },
                              "externalId": {
                                "type": "string",
                                "example": "crm-id-1234"
                              },
                              "tin": {
                                "type": "string",
                                "example": "123456789"
                              }
                            }
                          }
                        },
                        "policies": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "example": "newJoinersDeadline"
                              },
                              "deadline": {
                                "type": "string",
                                "example": "2026-12-30T23:59:59.000000Z"
                              }
                            }
                          }
                        }
                      }
                    },
                    "customer": {},
                    "fulfillment": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "example": "pickup"
                        }
                      }
                    },
                    "taxes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {}
                      }
                    },
                    "discounts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {}
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Insufficient permissions": {
                    "summary": "Insufficient permissions",
                    "value": {
                      "code": "insufficient_permissions",
                      "description": ""
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Basket not found": {
                    "summary": "Basket not found",
                    "value": {
                      "error": "basket not found"
                    }
                  },
                  "Account not found": {
                    "summary": "Account not found",
                    "value": {
                      "error": "account not found",
                      "http_code": 404,
                      "description": "account not found"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflict — a concurrent update to the basket was detected"
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "message",
                    "context",
                    "traceId"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "context": {
                      "type": "object"
                    },
                    "traceId": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Duplicate policy type": {
                    "summary": "Duplicate policy type",
                    "value": {
                      "code": "duplicate_policy_type",
                      "message": "Duplicate policy types found",
                      "context": {
                        "duplicate_policies": [
                          "groupSpendingLimit",
                          "customerSpendingLimit:cust-002"
                        ]
                      },
                      "traceId": "04e8c4fde9ad1dd765a1cb0c40ccc95a"
                    }
                  },
                  "Policy deadline must be in the future": {
                    "summary": "Policy deadline must be in the future",
                    "value": {
                      "code": "policy_deadline_must_be_in_future",
                      "message": "Deadline for newJoinersDeadline must be in the future.",
                      "context": {
                        "policyType": "newJoinersDeadline",
                        "deadline": "2026-09-01T11:00:00+00:00"
                      },
                      "traceId": "47f3225f5a4a6638fa9c25e91c50a664"
                    }
                  },
                  "Spending limit below current total": {
                    "summary": "Spending limit below current total",
                    "value": {
                      "code": "spending_limit_below_current_total",
                      "message": "Spending limit of 5000 is below the basket's current total of 6200.",
                      "context": {
                        "limit": 5000,
                        "currentTotal": 6200
                      },
                      "traceId": "3d3acf8161249bde23f9bc41e2052bac"
                    }
                  },
                  "Customer limit below current spend": {
                    "summary": "Customer limit below current spend",
                    "value": {
                      "code": "customer_limit_below_current_spend",
                      "message": "Limit of 1000 for customer cust-002 is below their current spend of 1450.",
                      "context": {
                        "customerId": "cust-002",
                        "limit": 1000,
                        "currentSpend": 1450
                      },
                      "traceId": "0c6197d623cf6e5a2ca10b8085ee5de5"
                    }
                  },
                  "Participants limit below current count": {
                    "summary": "Participants limit below current count",
                    "value": {
                      "code": "participants_limit_below_current_count",
                      "message": "Max participants limit of 5 is below the current participant count of 7.",
                      "context": {
                        "max": 5,
                        "currentCount": 7
                      },
                      "traceId": "e555558c21835357c653871f043568c1"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "accountId",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "basketId",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "patch_commerce-accountid-baskets-basketid-group-policies",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "newJoinersDeadline",
                        "groupItemsModificationDeadline",
                        "customerItemsModificationDeadline"
                      ]
                    },
                    "deadline": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "customerId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "deadline"
                  ]
                }
              },
              "examples": {
                "Policies": {
                  "summary": "Policies",
                  "value": [
                    {
                      "type": "newJoinersDeadline",
                      "deadline": "YYYY-MM-DDT08:36:46.SSSSSSZ"
                    },
                    {
                      "type": "groupItemsModificationDeadline",
                      "deadline": "YYYY-MM-DDT08:36:46.SSSSSSZ"
                    },
                    {
                      "type": "customerItemsModificationDeadline",
                      "customerId": "691327c5d367f4588f948202",
                      "deadline": "YYYY-MM-DDT08:36:46.SSSSSSZ"
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Update Basket - Group Order Policies"
      }
    }
  }
}
```